From 217b83ac94a845df0c91f8eff49481c3a1dbfc44 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Sat, 17 Dec 2022 14:06:55 +0530 Subject: [PATCH] fix powerup being picked up when you're at its position when you restart --- src/Marble.hx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Marble.hx b/src/Marble.hx index 75ea68bb..0e3e82bc 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -1428,10 +1428,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; @@ -1750,6 +1753,7 @@ class Marble extends GameObject { this.helicopterEnableTime = Math.NEGATIVE_INFINITY; this.megaMarbleEnableTime = Math.NEGATIVE_INFINITY; this.lastContactNormal = new Vector(0, 0, 1); + this.contactEntities = []; this.cloak = false; this._firstTick = true; if (this.teleporting) {