diff --git a/client/app.js b/client/app.js index d312130..395182b 100644 --- a/client/app.js +++ b/client/app.js @@ -105,6 +105,7 @@ export class App extends decorate(class {}) { this.simulationHandle = undefined; this.world = config.doPhysicsSimulation ? new World() : undefined; this.room.world = this.world; + this.room.world.stepTime = config.simulationFrequency; // State synchronization. this.state = undefined; this.synchronizer = new Synchronizer({ diff --git a/server/game.js b/server/game.js index e10d2d8..81dae48 100644 --- a/server/game.js +++ b/server/game.js @@ -20,6 +20,7 @@ export default class Game { this.entityPacketSynchronizer = new EntityPacketSynchronizer(); // Room. this.room = createRoom(); + this.room.world.stepTime = config.simulationInterval; for (const entity of this.room.allEntities()) { this.onEntityAddedToRoom(entity); }