mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +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));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(function(exports){
|
||||
|
||||
exports.onUpdatePlayerPhysics = function (state, inputs, deltaTime) {
|
||||
exports.onUpdatePlayerPhysics = function (id, state, inputs, deltaTime) {
|
||||
var i = 0;
|
||||
|
||||
if (!state.x && !state.y) {
|
||||
|
||||
Reference in New Issue
Block a user