Hacky workaround for BBH camera bug
One specific door didn't reset the vanilla camera when rushing through an open door. Fixes #48
This commit is contained in:
parent
c0a31ab06c
commit
daa05d98a0
|
@ -22,6 +22,12 @@ void door_animation_and_reset(s32 sp18) {
|
||||||
u8 door_allow_walk_through(void) {
|
u8 door_allow_walk_through(void) {
|
||||||
if (gCurrCourseNum != COURSE_NONE && gMarioStates[0].action == ACT_BUBBLED) { return TRUE; }
|
if (gCurrCourseNum != COURSE_NONE && gMarioStates[0].action == ACT_BUBBLED) { return TRUE; }
|
||||||
if (o->oAction == 0 || o->oAction > 2) { return FALSE; }
|
if (o->oAction == 0 || o->oAction > 2) { return FALSE; }
|
||||||
|
|
||||||
|
// special override for BBH's back door, camera gets stuck otherwise
|
||||||
|
if (gCurrCourseNum == COURSE_BBH && o->oDoorUnkF8 == 28) {
|
||||||
|
if (gCamera->mode != CAMERA_MODE_NEWCAM) { return FALSE; }
|
||||||
|
}
|
||||||
|
|
||||||
s32 cur = o->header.gfx.unk38.animFrame;
|
s32 cur = o->header.gfx.unk38.animFrame;
|
||||||
s32 max = o->header.gfx.unk38.curAnim->unk08 - 2;
|
s32 max = o->header.gfx.unk38.curAnim->unk08 - 2;
|
||||||
return (cur >= max / 4 && cur <= 7 * max / 8);
|
return (cur >= max / 4 && cur <= 7 * max / 8);
|
||||||
|
|
Loading…
Reference in New Issue