Scale a baby's walk position when it is read, as vanilla does

This commit is contained in:
Kacpherek
2026-10-26 20:35:46 +01:00
parent e704a8dccb
commit e23fcb1040
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -197,7 +197,8 @@ pub fn state(m: &Mob, alpha: f32) -> State {
let walking = m.alive() && !m.extra.passenger;
State {
pos: if walking {
m.limb_position - m.limb_speed * (1.0 - alpha)
// WalkAnimationState.position(partial): babies' legs move 3 times as far.
(m.limb_position - m.limb_speed * (1.0 - alpha)) * if m.is_baby() { 3.0 } else { 1.0 }
} else {
0.0
},
+1 -1
View File
@@ -908,7 +908,7 @@ impl Mob {
(distance * 4.0).min(1.0)
};
self.limb_speed += (target - self.limb_speed) * 0.4;
self.limb_position += self.limb_speed * if self.is_baby() { 3.0 } else { 1.0 };
self.limb_position += self.limb_speed;
} else {
self.limb_speed = 0.0;
}