update holiday
This commit is contained in:
@@ -54,9 +54,9 @@ func grab_item(grid_position: Vector2i) -> bool:
|
||||
if not player.is_multiplayer_authority():
|
||||
return false
|
||||
|
||||
# Play pickup animation
|
||||
if player.has_method("play_pickup_animation"):
|
||||
player.play_pickup_animation()
|
||||
# Play pickup animation (synced across network)
|
||||
if player.is_multiplayer_authority() and player.has_method("sync_pickup_animation"):
|
||||
player.rpc("sync_pickup_animation")
|
||||
|
||||
# === Optimistic Local Update (immediate visual feedback) ===
|
||||
# Apply changes locally first, server will validate/sync
|
||||
@@ -316,9 +316,9 @@ func auto_put_item() -> bool:
|
||||
var cell = Vector3i(target_pos.x, 1, target_pos.y)
|
||||
|
||||
if player.is_multiplayer_authority():
|
||||
# Play put animation
|
||||
if player.has_method("play_put_animation"):
|
||||
player.play_put_animation()
|
||||
# Play put animation (synced across network)
|
||||
if player.is_multiplayer_authority() and player.has_method("sync_put_animation"):
|
||||
player.rpc("sync_put_animation")
|
||||
|
||||
# === Optimistic Local Update (immediate visual feedback) ===
|
||||
enhanced_gridmap.set_cell_item(cell, item) # Add item to grid visually immediately
|
||||
|
||||
Reference in New Issue
Block a user