Skip to content

Commit

Permalink
removed pair.confirmedActive
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Aug 13, 2023
1 parent e4526a5 commit 72bc203
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/collision/Pair.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 1 addition & 6 deletions src/collision/Pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;

Expand Down

0 comments on commit 72bc203

Please sign in to comment.