mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-28 16:20:43 +08:00
Added playerId to callbacks
This commit is contained in:
@@ -9,7 +9,7 @@ $(function () {
|
||||
clientSidePrediction: true,
|
||||
interpolation: true,
|
||||
onUpdatePlayerPhysics: onUpdatePlayerPhysics,
|
||||
onInterpolation: function (previousState, targetState, amount) {
|
||||
onInterpolation: function (id, previousState, targetState, amount) {
|
||||
var interpolationState = {};
|
||||
interpolationState.x = (previousState.x + amount * (targetState.x - previousState.x));
|
||||
interpolationState.y = (previousState.y + amount * (targetState.y - previousState.y));
|
||||
|
||||
Reference in New Issue
Block a user