fix powerup being picked up when you're at its position when you restart

This commit is contained in:
RandomityGuy 2022-12-17 14:06:55 +05:30
parent 9984de59cd
commit 2a24ee8bc2

View file

@ -1197,10 +1197,13 @@ class Marble extends GameObject {
it++;
if (!this._firstTick)
this.findContacts(collisionWorld, tempState);
else
this.findContacts(collisionWorld, tempState);
if (this._firstTick) {
contacts = [];
this._firstTick = false;
}
var cmf = this.computeMoveForces(m);
var isCentered:Bool = cmf.result;
var aControl = cmf.aControl;
@ -1442,6 +1445,7 @@ class Marble extends GameObject {
this.shockAbsorberEnableTime = Math.NEGATIVE_INFINITY;
this.helicopterEnableTime = Math.NEGATIVE_INFINITY;
this.lastContactNormal = new Vector(0, 0, 1);
this.contactEntities = [];
this._firstTick = true;
}
}