0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-27 13:59:01 -05:00

Fixed end collision triggering more than once

This commit is contained in:
Brice Chevalier 2018-03-24 16:39:25 +09:00
parent 59708eff22
commit 4e04043fe0

View file

@ -94,7 +94,7 @@ var Common = require('../core/Common');
// deactivate previously active pairs that are now inactive
for (i = 0; i < pairsList.length; i++) {
pair = pairsList[i];
if (!pair.confirmedActive) {
if (pair.isActive && !pair.confirmedActive) {
Pair.setActive(pair, false, timestamp);
collisionEnd.push(pair);
}