mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-08-12 11:40:29 +08:00
Progress: Client Updates
This commit is contained in:
@@ -18,9 +18,9 @@ GarageServer.prototype.registerSocketEvents = function (options) {
|
||||
self.onPlayerDisconnect(socket, options);
|
||||
});
|
||||
|
||||
socket.on('input', function (input) {
|
||||
console.log('garageserver.io:: socket input ' + input);
|
||||
self.onPlayerInput(socket, input, options);
|
||||
socket.on('input', function (data) {
|
||||
console.log('garageserver.io:: socket input ' + socket.id + ' ' + data.input + ' ' + data.seq);
|
||||
self.onPlayerInput(socket, data, options);
|
||||
});
|
||||
|
||||
socket.on('ping', function (data) {
|
||||
|
||||
@@ -38,7 +38,7 @@ GarageServerGame.prototype.addPlayer = function (client) {
|
||||
client: client,
|
||||
state: {},
|
||||
inputs: [],
|
||||
sequence: 0
|
||||
sequence: 1
|
||||
};
|
||||
|
||||
this.players.push(player);
|
||||
|
||||
Reference in New Issue
Block a user