Disable walk effects when dead
This commit is contained in:
parent
02c39f01dc
commit
6545f54cfc
@ -411,7 +411,7 @@ impl ICharacterBody3D for LocalPlayer {
|
||||
scoreboard.set_visible(Input::singleton().is_action_pressed("scoreboard"));
|
||||
}
|
||||
|
||||
if self.movement_dir.length_squared() > 0. && self.base().is_on_floor() {
|
||||
if self.movement_dir.length_squared() > 0. && self.base().is_on_floor() && !self.is_dead {
|
||||
if let Some(effects) = &mut self.effects {
|
||||
effects.bind_mut().walk();
|
||||
}
|
||||
|
||||
@ -269,6 +269,7 @@ impl ICharacterBody3D for RemotePlayer {
|
||||
|
||||
if self.movement_dir.length_squared() > 0.
|
||||
&& self.base().is_on_floor()
|
||||
&& !self.is_dead
|
||||
&& let Some(effects) = &mut self.effects
|
||||
{
|
||||
effects.bind_mut().walk();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user