mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Updated GarageServer.IO API calls to support client side prediction for entities - #20
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user