various fixes

This commit is contained in:
bee
2026-07-09 08:18:48 +02:00
parent c4f2c0a202
commit e78d11998f
10 changed files with 33 additions and 25 deletions
+9 -3
View File
@@ -3,6 +3,9 @@ extends Node
@export var current_controlled : Boat:
set(value):
if current_controlled != null and current_controlled != value:
current_controlled.desired_throttle = 0.0
current_controlled.steer_input = 0.0
current_controlled = value
if is_node_ready():
if current_controlled != null:
@@ -57,6 +60,9 @@ func _process(delta: float) -> void:
current_controlled.fire_weapons()
func _possess() -> void:
camera_rig.target = current_controlled
world_manager.focus = current_controlled
hud.boat = current_controlled
if camera_rig != null:
camera_rig.target = current_controlled
if world_manager != null:
world_manager.focus = current_controlled
if hud != null:
hud.boat = current_controlled