feat: Implement the Stop 'n' Go game mode, including phase management, player missions, movement penalties, and associated player movement logic.
This commit is contained in:
@@ -120,17 +120,24 @@ func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
|
||||
rotate_towards_target(grid_position)
|
||||
|
||||
if player.is_multiplayer_authority() and _can_rpc():
|
||||
if player.is_multiplayer_authority():
|
||||
if player.has_method("sync_walk_animation"):
|
||||
player.rpc("sync_walk_animation")
|
||||
if _can_rpc():
|
||||
player.rpc("sync_walk_animation")
|
||||
else:
|
||||
player.sync_walk_animation()
|
||||
|
||||
var path = [Vector2(player.current_position.x, player.current_position.y), Vector2(grid_position.x, grid_position.y)]
|
||||
path.pop_front()
|
||||
|
||||
current_move_direction = grid_position - player.current_position
|
||||
|
||||
if player.is_multiplayer_authority() and _can_rpc():
|
||||
player.rpc("start_movement_along_path", path, not (player.is_bot or player.is_in_group("Bots")))
|
||||
if player.is_multiplayer_authority():
|
||||
var is_bot = player.is_bot or player.is_in_group("Bots")
|
||||
if _can_rpc():
|
||||
player.rpc("start_movement_along_path", path, not is_bot)
|
||||
else:
|
||||
player.start_movement_along_path(path, not is_bot)
|
||||
|
||||
return true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user