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
+4 -3
View File
@@ -14,7 +14,7 @@ func initialize(p_player: Node3D, p_movement_manager: Node, p_race_manager: Node
func _process(delta):
# Early return conditions
if not is_instance_valid(player) or not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots") or player.is_frozen or player.is_stop_frozen:
if not is_instance_valid(player) or not multiplayer.has_multiplayer_peer() or not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots") or player.is_frozen or player.is_stop_frozen:
return
if TurnManager.turn_based_mode:
@@ -59,8 +59,9 @@ func _process(delta):
func handle_unhandled_input(event):
# Early return if not authorized human player
if not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots"):
player.set_process_unhandled_input(false)
if not multiplayer.has_multiplayer_peer() or not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots"):
if multiplayer.has_multiplayer_peer():
player.set_process_unhandled_input(false)
return
var main = player.get_node("/root/Main")