mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 21:14:14 +00:00
Merge branch 'sab' into Atomic-SAB
This commit is contained in:
@@ -186,14 +186,13 @@ export class GameRunner {
|
||||
let packedTileUpdates: BigUint64Array;
|
||||
const tileUpdates = updates[GameUpdateType.Tile];
|
||||
if (this.tileUpdateSink !== undefined) {
|
||||
if (tileUpdates.length > 0) {
|
||||
console.log("[GameRunner] tile updates for tick", this.game.ticks(), {
|
||||
count: tileUpdates.length,
|
||||
});
|
||||
}
|
||||
const seenTiles = new Set<TileRef>();
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user