update obstacles

This commit is contained in:
2025-03-11 17:40:54 +08:00
parent 495c9c64a5
commit 161f03d931
3 changed files with 225 additions and 50 deletions
+3
View File
@@ -249,6 +249,9 @@ func place_obstacle(grid_position: Vector2i):
# Don't exit the obstacle placement mode to allow multiple placements
local_player_character.highlight_valid_obstacle_cells()
# Exit obstacle placement mode and return to default state
set_action_state(ActionState.NONE)
# Sync the obstacle with other clients
if is_multiplayer_authority():
rpc("sync_place_obstacle", grid_position.x, grid_position.y, floor_index, current_obstacle_item, direction)