feat: implement base Player character class with network synchronization and state management
This commit is contained in:
@@ -1353,6 +1353,7 @@ func is_position_occupied(pos: Vector2i) -> bool:
|
|||||||
if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1:
|
if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1:
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
var main_node = get_tree().get_root().get_node_or_null("Main")
|
||||||
if main_node and "reserved_static_positions" in main_node:
|
if main_node and "reserved_static_positions" in main_node:
|
||||||
for reserved in main_node.reserved_static_positions:
|
for reserved in main_node.reserved_static_positions:
|
||||||
if abs(pos.x - reserved.x) <= 1 and abs(pos.y - reserved.y) <= 1:
|
if abs(pos.x - reserved.x) <= 1 and abs(pos.y - reserved.y) <= 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user