Add fix for ice traps while wearing bunny hood (#1713)

This commit is contained in:
Garrett Cox 2022-10-09 01:38:25 -05:00 committed by GitHub
parent e883f27436
commit eb081dc719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10966,6 +10966,8 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c
this); this);
if ((overrideLimbDraw == func_80090014) && (this->currentMask != PLAYER_MASK_NONE)) { if ((overrideLimbDraw == func_80090014) && (this->currentMask != PLAYER_MASK_NONE)) {
// Fixes a bug in vanilla where ice traps are rendered extremely large while wearing a bunny hood
if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Push();
Mtx* sp70 = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Mtx)); Mtx* sp70 = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Mtx));
if (this->currentMask == PLAYER_MASK_BUNNY) { if (this->currentMask == PLAYER_MASK_BUNNY) {
@ -10987,6 +10989,7 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c
} }
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]); gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop();
} }
if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & 1) && if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & 1) &&