Completed: Client Side Prediction

This commit is contained in:
Jeremiah Billmann
2013-06-12 22:29:38 -04:00
parent 649fece9f0
commit cd95410f00
3 changed files with 65 additions and 12 deletions
+1 -1
View File
@@ -24,8 +24,8 @@ GarageServerGame.prototype.updatePhysics = function (options) {
if (this.options.onUpdatePhysics) {
this.players[i].state = this.options.onUpdatePhysics(this.players[i].state, this.players[i].inputs);
}
this.players[i].inputs = [];
this.players[i].sequence += this.players[i].inputs.length;
this.players[i].inputs = [];
}
}
};