various fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user