Fixed character anim offsets during certain dialog boxes

This commit is contained in:
MysterD 2023-06-16 18:09:23 -07:00
parent 9e0e2be194
commit ccfb46043b
2 changed files with 3 additions and 7 deletions

View File

@ -555,7 +555,7 @@ f32 get_character_anim_offset(struct MarioState* m) {
switch (sAnimTypes[animID]) {
case ANIM_TYPE_LOWY:
if (m->minimumBoneY < c->animOffsetLowYPoint) {
return -(m->minimumBoneY - c->animOffsetLowYPoint);
return c->animOffsetLowYPoint - m->minimumBoneY;
}
break;
case ANIM_TYPE_FEET:
@ -584,10 +584,6 @@ void update_character_anim_offset(struct MarioState* m) {
if (m->curAnimOffset > 40) { m->curAnimOffset = 40; }
if (m->curAnimOffset < -40) { m->curAnimOffset = -40; }
if (m->action == ACT_JUMBO_STAR_CUTSCENE) {
marioObj->header.gfx.pos[1] = m->pos[1] + m->curAnimOffset;
} else {
marioObj->header.gfx.pos[1] += m->curAnimOffset;
}
marioObj->header.gfx.pos[1] = m->pos[1] + m->curAnimOffset;
marioObj->header.gfx.node.flags |= GRAPH_RENDER_PLAYER;
}

View File

@ -1222,7 +1222,7 @@ static void geo_process_object(struct Object *node) {
}
}
if (gCurGraphNodeMarioState != NULL) {
gCurGraphNodeMarioState->minimumBoneY = 999;
gCurGraphNodeMarioState->minimumBoneY = 9999;
}
}