feat: update some visual and fixing the bug
This commit is contained in:
@@ -61,7 +61,7 @@ func _process(delta):
|
||||
emit_signal("global_timer_updated", global_match_timer)
|
||||
|
||||
# Server broadcasts global timer sync every second
|
||||
if multiplayer.is_server() and int(global_match_timer) != int(global_match_timer + delta):
|
||||
if multiplayer.has_multiplayer_peer() and multiplayer.is_server() and int(global_match_timer) != int(global_match_timer + delta):
|
||||
rpc("sync_global_timer", global_match_timer)
|
||||
|
||||
# Update cycle timer if cycle is active
|
||||
@@ -87,7 +87,7 @@ func _process(delta):
|
||||
emit_signal("timer_updated", current_cycle_timer)
|
||||
|
||||
# Server broadcasts timer sync every second
|
||||
if multiplayer.is_server() and int(current_cycle_timer) != int(current_cycle_timer + delta):
|
||||
if multiplayer.has_multiplayer_peer() and multiplayer.is_server() and int(current_cycle_timer) != int(current_cycle_timer + delta):
|
||||
rpc("sync_timer", current_cycle_timer)
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user