diff --git a/crates/horizon-client/src/game/creatures.rs b/crates/horizon-client/src/game/creatures.rs index 090f373b5..2a0ba2dcd 100644 --- a/crates/horizon-client/src/game/creatures.rs +++ b/crates/horizon-client/src/game/creatures.rs @@ -1859,6 +1859,9 @@ impl Game<'_> { && let Some(child) = self.mobs.iter_mut().find(|m| m.id == id) { child.extra.age = -24000; + // getBreedOffspring creates the baby without finalizeSpawn: it keeps + // the default (`classic`) sound variant. + child.extra.sound_variant = None; // A llama's baby was drawn in the parent's tick, with the // experience. if let Some(o) = llama { diff --git a/crates/horizon-client/src/mobs/allay.rs b/crates/horizon-client/src/mobs/allay.rs index ebc53ae49..8c2ced406 100644 --- a/crates/horizon-client/src/mobs/allay.rs +++ b/crates/horizon-client/src/mobs/allay.rs @@ -113,6 +113,18 @@ impl Goal for StayClose { d >= 256.0 }) } + /// `MoveToTargetSink.reachedTarget`: the walk target it set is reached + /// within a Manhattan block distance of 4 (`closeEnough`). + fn can_continue(&mut self, m: &mut Mob, cx: &mut Cx) -> bool { + m.extra.point.is_none() + && deposit(m, cx).is_some_and(|p| { + let at = [m.position.x, m.position.y, m.position.z]; + (0..3) + .map(|i| (p[i].floor() as i32 - at[i].floor() as i32).abs()) + .sum::() + > 4 + }) + } fn tick(&mut self, m: &mut Mob, cx: &mut Cx) { if let Some(p) = deposit(m, cx) && (m.ai.nav.is_done() || m.age.is_multiple_of(10))