new work towards M8

This commit is contained in:
patrick_pluto 2024-08-13 22:12:37 +02:00
commit bb7fd5cb3b
13 changed files with 194 additions and 75 deletions

View file

@ -80,21 +80,26 @@ func player_hit(target, beast):
Game.player_hit(target, beast)
@rpc("any_peer", "call_local", "unreliable")
func sync_player(node_name, position, rotation):
func sync_player(node_path, position, rotation):
if is_valid(multiplayer.get_remote_sender_id(), false):
Game.sync_player(node_name, position, rotation)
Game.sync_player(node_path, position, rotation)
@rpc("any_peer", "call_local", "unreliable")
func sync_hammer(node_name, rotation):
func sync_hammer(node_path, rotation):
if is_valid(multiplayer.get_remote_sender_id(), false):
Game.sync_hammer(node_name, rotation)
Game.sync_hammer(node_path, rotation)
@rpc("any_peer", "call_local", "reliable")
func sync_computers(node_name, current):
func sync_computers(node_path, current):
if is_valid(multiplayer.get_remote_sender_id(), true):
Game.sync_computers(node_name, current)
Game.sync_computers(node_path, current)
@rpc("any_peer", "call_local", "reliable")
func sync_beast(player):
if is_valid(multiplayer.get_remote_sender_id(), true):
Game.sync_beast(player)
@rpc("any_peer", "call_local", "reliable")
func sync_level(map_name):
if is_valid(multiplayer.get_remote_sender_id(), true):
Game.map_name = map_name