Added playerId to callbacks

This commit is contained in:
Jeremiah Billmann
2013-07-03 17:27:54 -04:00
parent b1e4e7a52e
commit 0204d254e6
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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) {