Skip to content

Commit

Permalink
Fix autospawn for 2player case
Browse files Browse the repository at this point in the history
It was incorrectly starting timer when the shortest wave finished
\ spawning
Should start timer only after both waves finished spawning
  • Loading branch information
Kvel2D committed Jul 7, 2024
1 parent cae4b97 commit 588f4e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/player/team.gd
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ func _on_next_wave_timer_timeout():


func _on_player_wave_spawned(level: int):
var wave_is_in_progress: bool = get_wave_is_in_progress()
if wave_is_in_progress:
return

var started_last_wave: bool = level == Globals.get_wave_count()
var difficulty_is_extreme: bool = Globals.get_difficulty() == Difficulty.enm.EXTREME
var game_is_neverending: bool = Globals.game_is_neverending()
Expand Down

0 comments on commit 588f4e5

Please sign in to comment.