added areaSensor to doll and not allowing client to update position when another player is nearby

This commit is contained in:
logsol 2014-05-29 20:27:41 +02:00
parent e7f4b6043d
commit b500ef436d
5 changed files with 78 additions and 18 deletions

View file

@ -74,7 +74,14 @@ function (Parent, Item, Box2D, Nc) {
}
}
}
Doll.prototype.updatePositionState = function(positionState) {
if(!this.isAnotherPlayerNearby()) {
this.body.SetAwake(true);
this.body.SetPosition(positionState);
}
};
return Doll;
});