feat: update some visual and fixing the bug

This commit is contained in:
2026-03-27 01:52:45 +08:00
parent 078ae4c966
commit 3a50d2d324
9 changed files with 310 additions and 31 deletions
+6
View File
@@ -1096,6 +1096,9 @@ func _process(delta):
if LobbyManager.get_randomize_spawn() and spawn_point_selected and not visible:
visible = true
if not multiplayer.has_multiplayer_peer():
return
if is_multiplayer_authority():
# Visual debugging - show display name with connection status
$Name.text = display_name if not display_name.is_empty() else str(name)
@@ -1184,6 +1187,9 @@ var last_sent_position: Vector3
func _physics_process(delta):
# Sync position periodically (Heartbeat / Smoothing)
if not multiplayer.has_multiplayer_peer():
return
if is_multiplayer_authority():
# OPTIMIZATION: Only send smoothing updates if we ARE NOT currently mid-tween
# The start/end of paths are already synced via start_movement_along_path.