diff --git a/src/core/GameRunner.ts b/src/core/GameRunner.ts index eddb1223d..af063633f 100644 --- a/src/core/GameRunner.ts +++ b/src/core/GameRunner.ts @@ -181,9 +181,13 @@ export class GameRunner { let packedTileUpdates: BigUint64Array; const tileUpdates = updates[GameUpdateType.Tile]; if (this.tileUpdateSink !== undefined) { + const seenTiles = new Set(); for (const u of tileUpdates) { const tileRef = Number(u.update >> 16n) as TileRef; - this.tileUpdateSink(tileRef); + if (!seenTiles.has(tileRef)) { + seenTiles.add(tileRef); + this.tileUpdateSink(tileRef); + } } packedTileUpdates = new BigUint64Array(); } else {