Fixed pole fix causing the game to crash PJ64 2.4

This commit is contained in:
Reonu
2021-05-07 14:41:14 +01:00
parent 73ec3dd2ed
commit fef6617890

View File

@@ -1532,7 +1532,9 @@ u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object *
marioObj->oMarioPoleUnk108 = 0;
marioObj->oMarioPoleYawVel = 0;
marioObj->oMarioPolePos = (m->pos[1] - o->oPosY) < 0 ? 0 : (m->pos[1] - o->oPosY);
marioObj->oMarioPolePos = (m->pos[1] - o->oPosY) < 0
? (m->pos[1] - o->oPosY) + 1.0f
: (m->pos[1] - o->oPosY);
if (lowSpeed) {
return set_mario_action(m, ACT_GRAB_POLE_SLOW, 0);