fix: phys ccd would only trigger on its last iteration due to a stupid oversight

This commit is contained in:
minjaesong
2023-08-13 16:54:46 +09:00
parent 6a43d1a5bd
commit 9919a99032

View File

@@ -779,7 +779,7 @@ open class ActorWithBody : Actor {
debug1("Update Frame: ${INGAME.WORLD_UPDATE_TIMER}")
debug1("Hitbox: ${hitbox}")
debug1("vec dir: ${Math.toDegrees(vectorSum.direction)}°, value: $vectorSum")
debug1("vec dir: ${Math.toDegrees(vectorSum.direction)}°, value: $vectorSum, magnitude: ${vectorSum.magnitude}")
// * NEW idea: wall pushes the actors (ref. SM64 explained by dutch pancake) *
@@ -806,8 +806,7 @@ open class ActorWithBody : Actor {
debug2("stepbox[$step]=$stepBox; goingDown=$goingDown, downDown=$downDown")
// careful when using feet mode, as it will only look for collision on feet tiles!
if (isColliding(stepBox, goingDown && !downDown)) {
if (collidingStep == null && isColliding(stepBox, goingDown && !downDown)) {
collidingStep = step
}