fix: a lot of networking bugs
This commit is contained in:
@@ -102,12 +102,19 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
if ignited and is_instance_valid(weapon_source):
|
||||
var target_dir: Vector3 = initial_aim_dir
|
||||
var is_painting = weapon_source.get("is_targeting")
|
||||
var is_painting = false
|
||||
var target: Vector3 = Vector3.ZERO
|
||||
|
||||
if is_painting != null and is_painting:
|
||||
var target: Vector3 = weapon_source.get("homing_target_pos")
|
||||
if target != null and target != Vector3.ZERO:
|
||||
target_dir = (target - global_position).normalized()
|
||||
if weapon_source.get("player") and weapon_source.player:
|
||||
is_painting = weapon_source.player.synced_is_targeting
|
||||
target = weapon_source.player.synced_homing_target_pos
|
||||
else:
|
||||
is_painting = weapon_source.get("is_targeting")
|
||||
if is_painting != null and is_painting:
|
||||
target = weapon_source.get("homing_target_pos")
|
||||
|
||||
if is_painting and target != Vector3.ZERO:
|
||||
target_dir = (target - global_position).normalized()
|
||||
|
||||
if target_dir != Vector3.ZERO:
|
||||
var current_dir = velocity.normalized()
|
||||
|
||||
Reference in New Issue
Block a user