update holiday

This commit is contained in:
2026-01-01 05:21:25 +08:00
parent c5e9d073fa
commit 7423e29443
12 changed files with 273 additions and 37 deletions
+6 -3
View File
@@ -32,6 +32,9 @@ func rotate_towards_target(target_pos: Vector2i):
var direction = Vector3(target_pos.x - player.current_position.x, 0, target_pos.y - player.current_position.y)
if direction != Vector3.ZERO:
target_rotation = atan2(direction.x, direction.z)
# Sync rotation to other clients
if player.is_multiplayer_authority():
player.rpc("sync_rotation", target_rotation)
func simple_move_to(grid_position: Vector2i) -> bool:
if not player.is_multiplayer_authority() or is_moving:
@@ -70,9 +73,9 @@ func simple_move_to(grid_position: Vector2i) -> bool:
# All checks passed, perform move
rotate_towards_target(grid_position)
# Play walk animation
if player.has_method("play_walk_animation"):
player.play_walk_animation()
# Play walk animation (synced across network)
if player.is_multiplayer_authority() and player.has_method("sync_walk_animation"):
player.rpc("sync_walk_animation")
var path = [Vector2(player.current_position.x, player.current_position.y), Vector2(grid_position.x, grid_position.y)]
path.pop_front()