mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added constant WORLD_UPDATE_BROADCAST_INTERVAL. fixes #11
This commit is contained in:
parent
3bbb29b24f
commit
c8f5d9c820
2 changed files with 5 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ define(requires, function(PhysicsEngine, Player, Box2D, Level, InputController,
|
|||
this.serverGame.updateClientsWorld(update);
|
||||
}
|
||||
|
||||
setTimeout(this.updateWorld.bind(this), 15); // FIXME: do this a different hearbeat
|
||||
setTimeout(this.updateWorld.bind(this), Settings.WORLD_UPDATE_BROADCAST_INTERVAL);
|
||||
}
|
||||
|
||||
return ServerProcessor;
|
||||
|
|
|
|||
|
|
@ -42,10 +42,13 @@ define(function() {
|
|||
ITEM_FRICTION: 0.99,
|
||||
ITEM_RESTITUTION: 0.02,
|
||||
|
||||
// BROWSER
|
||||
CANVAS_DOM_ID: 'canvasContainer',
|
||||
IS_BROWSER_ENVIRONMENT: isBrowserEnvironment(),
|
||||
DEBUG_MODE: true,
|
||||
|
||||
DEBUG_MODE: true
|
||||
// NETWORKING
|
||||
WORLD_UPDATE_BROADCAST_INTERVAL: 15
|
||||
};
|
||||
|
||||
function isBrowserEnvironment(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue