Boats: keep the ticked list only while a mod hears the ticks

Without mods the round doesn't listen and the Posts send nothing, so the
per-tick list of ticked boats (an entry and a kind per boat) isn't built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-11-01 22:10:56 +01:00
1 parent 4fe32489bd
commit ae295952ce
1 file changed
+4 -2
+4 -2
View File
@@ -725,7 +725,7 @@ impl Game<'_> {
let driven = self.guest_vehicles();
// EntityTickEvent.Post comes once AbstractBoat.tick is over, after the
// passes below (lava, ejection, bubbles, contacts): the ticked boats,
// in order.
// in order, kept only while a mod listens (no list without mods).
let mut ticked = Vec::new();
for i in 0..self.boats.len() {
// A mod's hook may have removed boats.
@@ -763,7 +763,9 @@ impl Game<'_> {
};
let b = self.boats[i].clone();
self.boats[i] = self.tick_boat(b, false);
ticked.push((id, kind));
if round.listening() {
ticked.push((id, kind));
}
}
// AbstractBoat.tick's applyEffectsFromBlocks, on the server for every
// boat, the client-driven ones too.