mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
walk fixes
This commit is contained in:
parent
ecb85a0534
commit
eb2395a401
@ -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, .. }
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user