diff --git a/scenes/main.gd b/scenes/main.gd index d67deb3..be54587 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -249,8 +249,8 @@ func broadcast_message(player_name: String, message: String): func _setup_global_match_timer_ui(): """Create the global match timer display at the top of the screen.""" - # Check if timer check is enabled in lobby settings - if not LobbyManager.enable_cycle_timer: + # Check if timer check is enabled in lobby settings OR if in Stop n Go mode + if not LobbyManager.enable_cycle_timer and LobbyManager.game_mode != "Stop n Go": var existing = get_node_or_null("GlobalMatchTimer") if existing: existing.visible = false @@ -563,6 +563,11 @@ func _start_game(): # Only Server starts the mode logic (arena setup, missions, etc) if stop_n_go_manager: stop_n_go_manager.start_game_mode() + + # Also start global match timer for Stop n Go + if goals_cycle_manager: + var match_duration = LobbyManager.get_match_duration() + goals_cycle_manager.start_match(float(match_duration), false) # No cycles for Stop n Go elif goals_cycle_manager: var match_duration = LobbyManager.get_match_duration() goals_cycle_manager.start_match(float(match_duration)) diff --git a/scripts/managers/goals_cycle_manager.gd b/scripts/managers/goals_cycle_manager.gd index d47269b..47ac422 100644 --- a/scripts/managers/goals_cycle_manager.gd +++ b/scripts/managers/goals_cycle_manager.gd @@ -93,7 +93,7 @@ func _process(delta): # Global Match Control # ============================================================================= -func start_match(duration_seconds: float): +func start_match(duration_seconds: float, start_cycles: bool = true): """Start the global match timer. Called by server when game starts.""" match_duration = duration_seconds global_match_timer = duration_seconds @@ -103,8 +103,9 @@ func start_match(duration_seconds: float): if multiplayer.is_server(): rpc("sync_match_start", duration_seconds) - # Also start the first cycle - start_cycle() + # Only start the first cycle if requested + if start_cycles: + start_cycle() func _on_match_end(): """Called when global match timer reaches zero - game over!""" diff --git a/scripts/managers/stop_n_go_manager.gd b/scripts/managers/stop_n_go_manager.gd index e2bc708..89a86f0 100644 --- a/scripts/managers/stop_n_go_manager.gd +++ b/scripts/managers/stop_n_go_manager.gd @@ -9,8 +9,8 @@ signal player_penalized(player_id: int) enum Phase {GO, STOP} -const GO_DURATION: float = 12.0 -const STOP_DURATION: float = 6.0 +const GO_DURATION: float = 8.0 +const STOP_DURATION: float = 4.0 const REQUIRED_GOALS: int = 2 var current_phase: Phase = Phase.GO