now really fixed jetpack graphics synchronisation

This commit is contained in:
Jan Heemstra 2021-04-07 23:54:52 +02:00
parent 2ee196b26f
commit 041d1cfd4f
2 changed files with 9 additions and 5 deletions

View file

@ -194,15 +194,16 @@ func _physics_process(delta):
if is_dead:
return
if str(get_tree().get_network_unique_id()) != name:
return
check_floor_collision()
walk(delta)
fall(delta)
jetpack_grounded(delta)
if str(get_tree().get_network_unique_id()) != name:
return
var movement_vector = Vector3()
if jump_timeout > 0:
movement_vector = move_and_slide(velocity, Vector3.UP)
@ -323,7 +324,7 @@ master func kill():
# gibs.queue_free()
func spawn():
is_dead = false
rpc("unset_death")
set_health(max_health)
velocity = Vector3()
@ -338,6 +339,9 @@ func spawn():
$Camera.rotation = Vector3.ZERO
rotation = Vector3.ZERO
sync func unset_death():
is_dead = false
func shoot():
# The underscore indicates an unused variable.
# Because it is declared in this scope, it will disappear as soon as the

View file

@ -220,7 +220,7 @@ script = ExtResource( 8 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.53592, -0.0651628 )
[node name="Hand" type="Spatial" parent="Camera"]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.392394, -0.559 )
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.391233, -0.559 )
[node name="WeaponBobAnimationTree" type="AnimationTree" parent="Camera/Hand"]
tree_root = SubResource( 12 )