walk fixes

This commit is contained in:
Isse 2023-10-15 16:33:11 +02:00
parent ecb85a0534
commit eb2395a401
2 changed files with 2 additions and 1 deletions

View File

@ -1071,7 +1071,6 @@ impl CharacterAbility {
&& match self { && match self {
CharacterAbility::Roll { energy_cost, .. } => { CharacterAbility::Roll { energy_cost, .. } => {
data.physics.on_ground.is_some() data.physics.on_ground.is_some()
&& data.inputs.move_dir.magnitude_squared() > 0.25
&& update.energy.try_change_by(-*energy_cost).is_ok() && update.energy.try_change_by(-*energy_cost).is_ok()
}, },
CharacterAbility::DashMelee { energy_cost, .. } CharacterAbility::DashMelee { energy_cost, .. }

View File

@ -44,6 +44,8 @@ impl KeyState {
if self.up || self.auto_walk { 1.0 } else { 0.0 } if self.up || self.auto_walk { 1.0 } else { 0.0 }
+ if self.down { -1.0 } else { 0.0 }, + if self.down { -1.0 } else { 0.0 },
) )
.try_normalized()
.unwrap_or_default()
} else { } else {
self.analog_matrix self.analog_matrix
} * self.speed_mul; } * self.speed_mul;