mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-09-13 12:11:10 +08:00
Added playerId to callbacks
This commit is contained in:
@@ -39,7 +39,7 @@ GarageServerGame.prototype.updatePhysics = function (options) {
|
||||
this.players.forEach(function (player) {
|
||||
if (player.inputs.length > 0) {
|
||||
if (options.onUpdatePlayerPhysics) {
|
||||
player.state = options.onUpdatePlayerPhysics(player.state, player.inputs, self.physicsDelta);
|
||||
player.state = options.onUpdatePlayerPhysics(player.client.id, player.state, player.inputs, self.physicsDelta);
|
||||
}
|
||||
player.sequence += player.inputs.length;
|
||||
player.inputs = [];
|
||||
|
||||
Reference in New Issue
Block a user