mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Avoid unchecked clamp in skate character state
This commit is contained in:
parent
7c7f737118
commit
76f48a5bf4
@ -58,7 +58,9 @@ impl CharacterBehavior for Data {
|
||||
data.sidewalk = 0.0;
|
||||
}
|
||||
// forward, max at 8u/s
|
||||
(data.dt.0 * 3.0).clamp(0.0, 8.0 - current_planar_velocity)
|
||||
(data.dt.0 * 3.0)
|
||||
.min(8.0 - current_planar_velocity)
|
||||
.max(0.0)
|
||||
} else {
|
||||
if let CharacterState::Skate(data) = &mut update.character {
|
||||
data.accelerate = -1.0;
|
||||
|
Loading…
Reference in New Issue
Block a user