From 9153c7b836e4f32422e2db297b73139db916383d Mon Sep 17 00:00:00 2001 From: liabru Date: Fri, 14 Mar 2014 16:11:04 +0000 Subject: [PATCH] fixed removal bug in pair manager --- src/collision/Manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collision/Manager.js b/src/collision/Manager.js index 333262e..8ee4e91 100644 --- a/src/collision/Manager.js +++ b/src/collision/Manager.js @@ -109,7 +109,7 @@ var Manager = {}; // remove marked pairs for (i = 0; i < indexesToRemove.length; i++) { - pairIndex = indexesToRemove[i]; + pairIndex = indexesToRemove[i] - i; pair = pairsList[pairIndex]; delete pairsTable[pair.id]; pairsList.splice(pairIndex, 1);