mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Refactoring client side prediction for players to make for consistent API calls with client side prediction for entities (#20)
This commit is contained in:
@@ -10,7 +10,9 @@ $(function () {
|
||||
GarageServerIO.initializeGarageServer('', {
|
||||
logging: true,
|
||||
onReady: startGame,
|
||||
onUpdatePlayerPrediction: GamePhysics.getNewPlayerState,
|
||||
onUpdateClientPredictionReady: function(playerId, playerCurrentState, inputs, deltaTime) {
|
||||
GarageServerIO.updatePlayerState(playerId, GamePhysics.getNewPlayerState(playerCurrentState, inputs, deltaTime));
|
||||
},
|
||||
onInterpolation: GamePhysics.getInterpolatedState
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user