Scale a baby's walk position when it is read, as vanilla does
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user