From 72bc203c27549fa263c6183eea720e299a462527 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 13 Aug 2023 14:54:30 +0100 Subject: [PATCH] removed pair.confirmedActive --- src/collision/Pair.js | 1 - src/collision/Pairs.js | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/collision/Pair.js b/src/collision/Pair.js index eac2d97..f1b4e6b 100644 --- a/src/collision/Pair.js +++ b/src/collision/Pair.js @@ -32,7 +32,6 @@ var Contact = require('./Contact'); contactCount: 0, separation: 0, isActive: true, - confirmedActive: true, isSensor: bodyA.isSensor || bodyB.isSensor, timeCreated: timestamp, timeUpdated: timestamp, diff --git a/src/collision/Pairs.js b/src/collision/Pairs.js index bb223b5..99c02ca 100644 --- a/src/collision/Pairs.js +++ b/src/collision/Pairs.js @@ -52,10 +52,6 @@ var Common = require('../core/Common'); pair, i; - for (i = 0; i < pairsListLength; i++) { - pairsList[i].confirmedActive = false; - } - for (i = 0; i < collisionsLength; i++) { collision = collisions[i]; pair = collision.pair; @@ -72,7 +68,6 @@ var Common = require('../core/Common'); // update the pair Pair.update(pair, collision, timestamp); - pair.confirmedActive = true; } else { // pair did not exist, create a new pair pair = Pair.create(collision, timestamp); @@ -91,7 +86,7 @@ var Common = require('../core/Common'); for (i = 0; i < pairsListLength; i++) { pair = pairsList[i]; - if (!pair.confirmedActive) { + if (pair.timeUpdated < timestamp) { Pair.setActive(pair, false, timestamp); collisionEnd[collisionEndIndex++] = pair;