Added check to prevent melee leaps from stalling in liquids

This commit is contained in:
Knightress Paladin 2021-07-08 23:51:58 -07:00
parent cc505faa66
commit c5c89e8662

View File

@ -101,7 +101,7 @@ impl CharacterBehavior for Data {
timer: tick_attack_or_default(data, self.timer, None), timer: tick_attack_or_default(data, self.timer, None),
..*self ..*self
}); });
} else if data.physics.on_ground.is_some() { } else if data.physics.on_ground.is_some() | data.physics.in_liquid().is_some() {
// Transitions to swing portion of state upon hitting ground // Transitions to swing portion of state upon hitting ground
update.character = CharacterState::LeapMelee(Data { update.character = CharacterState::LeapMelee(Data {
timer: Duration::default(), timer: Duration::default(),