Added TODOs

This commit is contained in:
Jeremiah Billmann
2013-06-01 16:43:18 -04:00
parent 443a0634f9
commit f1efb63483
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -33,11 +33,13 @@ window.GarageServerIO = (function (window, socketio) {
updatePlayerInput = function (data) {
var playerFound = false;
if(socket.id === data.id) {
if(socket.socket.sessionid === data.id) {
//TODO: Don't add if sequence state is already stored.
updates.push(data);
}
else {
for(var i = 0; i < players.length; i ++) {
//TODO: Don't add if sequence state is already stored.
if(players[i].id === data.id) {
playerFound = true;
players[i].state = data.state;
+1
View File
@@ -12,6 +12,7 @@ function GarageServerGame (socket, options) {
GarageServerGame.prototype.updatePlayers = function () {
var currentTime = new Date().getTime();
for(var i = 0; i < this.players.length; i ++) {
//TODO: Retink efficiency
this.socket.emit('update', { id: this.players[i].client.id, state: this.players[i].state, seq: this.players[i].sequence, timestamp: currentTime });
}
};