mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-29 11:15:16 +08:00
Remove no longer used code.
This commit is contained in:
@@ -39,27 +39,6 @@ GarageServerGame.prototype.getState = function (controller) {
|
||||
return states;
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.updatePhysics = function (options) {
|
||||
var self = this,
|
||||
currentTime = new Date().getTime() - this.startTime;
|
||||
|
||||
this.playerController.entities.forEach(function (player) {
|
||||
if (player.inputs.length > 0) {
|
||||
if (options.onUpdatePlayerPhysics) {
|
||||
player.addState(options.onUpdatePlayerPhysics(player.client.id, player.state, player.inputs, self.physicsDelta), player.inputs[player.inputs.length - 1].time);
|
||||
player.sequence += player.inputs.length;
|
||||
player.inputs = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.entityController.entities.forEach(function (entity) {
|
||||
if (options.onUpdateEntityPhysics) {
|
||||
entity.addState(options.onUpdateEntityPhysics(entity.id, entity.state, self.physicsDelta), currentTime);
|
||||
entity.sequence += 1;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.getPlayers = function () {
|
||||
return this.playerController.entities;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user