Reduced size of internal JSON property names.

This commit is contained in:
Jeremiah Billmann
2014-11-15 02:52:24 +00:00
parent 06ecaacb91
commit ac4bc7be48
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -27,17 +27,17 @@ GarageServerGame.prototype.stop = function () {
GarageServerGame.prototype.broadcastState = function () {
var i = 0, currentTime = new Date().getTime() - this.startTime,
state = { time: currentTime, playerStates: [], entityStates: [] };
state = { t: currentTime, ps: [], es: [] };
if (this.regions.length > 0) {
for (i = 0; i < this.regions.length; i ++) {
state.playerStates = this.getStateByRegion(this.playerController, this.regions[i]);
state.entityStates = this.getStateByRegion(this.entityController, this.regions[i]);
state.ps = this.getStateByRegion(this.playerController, this.regions[i]);
state.es = this.getStateByRegion(this.entityController, this.regions[i]);
this.broadcastCallback(state, this.regions[i]);
}
} else {
state.playerStates = this.getState(this.playerController);
state.entityStates = this.getState(this.entityController);
state.ps = this.getState(this.playerController);
state.es = this.getState(this.entityController);
this.broadcastCallback(state);
}
};