mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 09:13:51 +00:00
Change the ring buffer to Uint32Array
Store only TileRef instead of packed tile+state values
This commit is contained in:
@@ -662,11 +662,15 @@ export class ClientGameRunner {
|
||||
|
||||
if (this.tileRingViews) {
|
||||
const MAX_TILE_UPDATES_PER_RENDER = 100000;
|
||||
const tileRefs: TileRef[] = [];
|
||||
drainTileUpdates(
|
||||
this.tileRingViews,
|
||||
MAX_TILE_UPDATES_PER_RENDER,
|
||||
combinedPackedTileUpdates,
|
||||
tileRefs,
|
||||
);
|
||||
for (const ref of tileRefs) {
|
||||
combinedPackedTileUpdates.push(BigInt(ref));
|
||||
}
|
||||
} else {
|
||||
for (const gu of batch) {
|
||||
gu.packedTileUpdates.forEach((tu) => {
|
||||
|
||||
Reference in New Issue
Block a user