summaryrefslogtreecommitdiff
path: root/godot/scripts/vehicles/Gunboat.gd
diff options
context:
space:
mode:
Diffstat (limited to 'godot/scripts/vehicles/Gunboat.gd')
-rw-r--r--godot/scripts/vehicles/Gunboat.gd11
1 files changed, 9 insertions, 2 deletions
diff --git a/godot/scripts/vehicles/Gunboat.gd b/godot/scripts/vehicles/Gunboat.gd
index 1defce2..1403a50 100644
--- a/godot/scripts/vehicles/Gunboat.gd
+++ b/godot/scripts/vehicles/Gunboat.gd
@@ -22,7 +22,7 @@ const damage_threshold = 20
const max_depth = 2
#boat ids
-onready var nav_rid = $NavigationMeshInstance.get_region_rid()
+onready var nav_rid = 0#$NavigationMeshInstance.get_region_rid()
#controls
var throttle: float = 0.0
@@ -43,8 +43,15 @@ func _ready():
for sail in $SAILS.get_children():
sail.set_sheet(sail_out)
world = get_tree().get_root().find_node("GAMEWORLD", true, false)
+ var plr = get_tree().get_root().find_node("PLAYERS", true, false)
+ for player in get_node("CREW").get_children():
+ var t: Transform = player.global_transform
+ get_node("CREW").remove_child(player)
+ plr.add_child(player, true)
+ player.global_transform = t
+ #call_deferred("remove_child", get_node("CREW"))
if get_tree().get_network_unique_id() == 1:
- print("enabling navigation for server")
+ pass#print("enabling navigation for server")
#$NavigationMeshInstance.set_enabled(true)
func on_no_control():