feat: Introduce core player movement manager with grid-based movement, player pushing mechanics, and initial bot control and strategic planning.
This commit is contained in:
@@ -50,17 +50,7 @@ func _can_rpc() -> bool:
|
||||
|
||||
func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
if is_moving:
|
||||
# Check if we are already moving to this position or if it's already queued
|
||||
var current_target = player.target_position
|
||||
if movement_queue.is_empty():
|
||||
if current_target == grid_position:
|
||||
return false
|
||||
elif movement_queue[-1] == grid_position:
|
||||
return false
|
||||
|
||||
if movement_queue.size() < 1: # Buffer at most 1 future move
|
||||
movement_queue.append(grid_position)
|
||||
return true
|
||||
return false
|
||||
|
||||
if not player.is_multiplayer_authority():
|
||||
print("[Move] Failed: Not authority for %s (Authority: %d, My Peer: %d)" % [player.name, player.get_multiplayer_authority(), player.multiplayer.get_unique_id()])
|
||||
|
||||
Reference in New Issue
Block a user