reparent stuff fixed
This commit is contained in:
parent
f4b7bf282d
commit
999a88c402
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user