Proper death
This commit is contained in:
parent
e8af70b198
commit
d918533ebe
4 changed files with 20 additions and 4 deletions
|
|
@ -8824,6 +8824,7 @@ script = ExtResource("38_2cl6u")
|
|||
[connection signal="died" from="." to="Camera3D/DeadSpectator" method="set_active"]
|
||||
[connection signal="died" from="." to="BodyStateMachine/Death" method="on_death"]
|
||||
[connection signal="died" from="." to="PlayerMovement" method="disable"]
|
||||
[connection signal="died" from="." to="WeaponSystem" method="drop_death"]
|
||||
[connection signal="died" from="." to="WeaponSystem" method="disable"]
|
||||
[connection signal="died" from="." to="PickupRange" method="disable"]
|
||||
[connection signal="health_changed" from="." to="HUD/Healthbar" method="on_hp_changed"]
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ func die() -> void:
|
|||
died.emit()
|
||||
die_on_peers.rpc()
|
||||
passived = true
|
||||
collision_layer = 0
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func die_on_peers():
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ var debuff_tween: Tween
|
|||
|
||||
func disable() -> void:
|
||||
disabled = true
|
||||
player.velocity = Vector3.ZERO
|
||||
|
||||
func process_movement(max_speed: float,acceleration: float,deceleration: float,delta: float) -> void:
|
||||
if is_multiplayer_authority() == false:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue