Updated GarageServer.IO API calls to support client side prediction for entities - #20

This commit is contained in:
Jeremiah Billmann
2015-05-20 02:10:07 +00:00
parent 21d8fb2884
commit fbdcfe3da5
12 changed files with 48 additions and 25 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ $(function () {
GarageServerIO.initializeGarageServer('', {
logging: true,
onReady: startGame,
onUpdateClientPredictionReady: function(playerId, playerCurrentState, inputs, deltaTime) {
GarageServerIO.updatePlayerState(playerId, GamePhysics.getNewPlayerState(playerCurrentState, inputs, deltaTime));
onUpdateClientPredictionReady: function(playerId, playerCurrentState, entityCurrentStates, inputs, deltaTime) {
GarageServerIO.updatePlayerState(playerId, GamePhysics.getNewPlayerState(playerId, playerCurrentState, inputs, deltaTime));
},
onInterpolation: GamePhysics.getInterpolatedState
});