From 6c6c08f4d9ef42e65b5ed9e4a75fcb022fafa65a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:39:13 +0200 Subject: [PATCH] Fluid contact on a client: only for the entities that tick A frozen level (TickRateManager.isEntityFrozen) ticks only the players, so their fluid contact is the only one that moves on, as in the loop below. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/remote.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index e166ff444..d4227f60c 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -3328,15 +3328,22 @@ impl Game<'_> { // EntityFluidInteraction.update for the entities this window only displays: the // server never sends the fluid contact, and the renderers read it (cod, salmon and // tropical fish lie on their side without `in_water`, #1591). + // A frozen level ticks only the players, as below. let fluids: Vec<_> = { let w = self.mob_world_base(&[]); + let players = self.remote.as_ref().map(|r| &r.level_players); self.mobs .iter() - .map(|m| w.fluids(m.bounds(), m.eye_y())) + .map(|m| { + (running || players.is_some_and(|p| p.contains_key(&(m.id as i32)))) + .then(|| w.fluids(m.bounds(), m.eye_y())) + }) .collect() }; for (m, fluids) in self.mobs.iter_mut().zip(fluids) { - m.fluids = fluids; + if let Some(fluids) = fluids { + m.fluids = fluids; + } } let Some(r) = self.remote.as_mut() else { return;