update bot

This commit is contained in:
2026-01-06 08:55:14 +08:00
parent cbbe95e108
commit 059f152374
12 changed files with 353 additions and 148 deletions
+12 -3
View File
@@ -91,10 +91,14 @@ func _on_match_end():
"""Called when global match timer reaches zero - game over!"""
is_match_active = false
is_cycle_active = false
emit_signal("match_ended")
if multiplayer.is_server():
rpc("sync_match_end")
# FINAL SCORING: Process any points remaining on board
_process_cycle_end_for_all_players()
# Sync final scores THEN end match on clients
rpc("sync_final_scores")
else:
emit_signal("match_ended")
@rpc("authority", "call_local", "reliable")
func sync_match_start(duration_seconds: float):
@@ -105,9 +109,14 @@ func sync_match_start(duration_seconds: float):
emit_signal("match_started")
@rpc("authority", "call_local", "reliable")
func sync_match_end():
func sync_final_scores():
"""Called by server at match end. Signals clients to stop."""
is_match_active = false
is_cycle_active = false
# Request final leaderboard refresh
_update_leaderboard()
emit_signal("match_ended")
@rpc("authority", "call_local", "unreliable")