From 72dc454bd575ce31c2757bded5b2c8552823ae62 Mon Sep 17 00:00:00 2001 From: logsol Date: Thu, 29 May 2014 21:31:26 +0200 Subject: [PATCH] bugfix for positionStateUpdate --- app/Game/Client/Me.js | 1 - app/Game/Core/GameObjects/Doll.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Game/Client/Me.js b/app/Game/Client/Me.js index 89cb98a..8a9e24b 100644 --- a/app/Game/Client/Me.js +++ b/app/Game/Client/Me.js @@ -39,7 +39,6 @@ function (Parent, Settings) { if(difference.x > Settings.ME_STATE_MAX_DIFFERENCE_METERS || difference.y > Settings.ME_STATE_MAX_DIFFERENCE_METERS) { - console.log('AAAAHHHH'); return true; } return false; diff --git a/app/Game/Core/GameObjects/Doll.js b/app/Game/Core/GameObjects/Doll.js index b0aa452..263b161 100755 --- a/app/Game/Core/GameObjects/Doll.js +++ b/app/Game/Core/GameObjects/Doll.js @@ -17,7 +17,7 @@ function (Parent, Box2D, Settings, CollisionDetector, Item, Nc) { this.width = 9; this.headHeight = 12; this.reachDistance = 20; - this.areaSize = 25; + this.areaSize = 35; Parent.call(this, physicsEngine, uid); @@ -162,14 +162,14 @@ function (Parent, Box2D, Settings, CollisionDetector, Item, Nc) { var userData = fixture.GetBody().GetUserData() if(userData instanceof Doll) { var doll = userData; - var i = this.nearbyDolls.indexOf(doll); + var i = self.nearbyDolls.indexOf(doll); if(isColliding) { if(i === -1) { - this.nearbyDolls.push(doll); + self.nearbyDolls.push(doll); } } else { if(i !== -1) { - this.nearbyDolls.slice(i, 1); + self.nearbyDolls.splice(i, 1); } } }