Ship mostly works #10

Merged
chrisbell merged 60 commits from feature/ship-syncing into develop 2024-12-29 04:35:51 +00:00
Showing only changes of commit 999a88c402 - Show all commits

View File

@ -107,6 +107,7 @@ func remove_piloting_player():
# When a player enters the ship's detection area
func _on_player_entered(body):
if body is Player and body.get_parent() != self:
if !body.is_network_authority: return
body.call_deferred("reparent", self, true)
body.ship_entered(self)
print("Player entered the ship area.")
@ -114,6 +115,7 @@ func _on_player_entered(body):
# When a player exits the ship's detection area
func _on_player_exited(body):
if body is Player and body.get_parent() != get_node("/root/DevLevel/"):
if !body.is_network_authority: return
body.call_deferred("reparent", get_node("/root/DevLevel/"), true)
body.ship_exited()
print("Player exited the ship area.")