Fix Phantom Ganon fast death time saver crash. (#4476)

This commit is contained in:
Malkierian 2024-10-24 21:55:17 -07:00 committed by GitHub
parent 8638810b9d
commit 89fe9c1ccb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -343,6 +343,7 @@ typedef enum {
// Opt: *EnBox // Opt: *EnBox
VB_GIVE_ITEM_FROM_CHEST, VB_GIVE_ITEM_FROM_CHEST,
// Opt: ItemID
VB_GIVE_ITEM_FROM_BLUE_WARP, VB_GIVE_ITEM_FROM_BLUE_WARP,
// Opt: *EnItem00 // Opt: *EnItem00
VB_GIVE_ITEM_FROM_ITEM_00, VB_GIVE_ITEM_FROM_ITEM_00,
@ -469,8 +470,9 @@ typedef enum {
VB_DEKU_UPDATE_BURNING_DEKU_STICK, VB_DEKU_UPDATE_BURNING_DEKU_STICK,
/*** Quick Boss Deaths ***/ /*** Quick Boss Deaths ***/
// Vanilla condition: true // Vanilla condition: true; Opt: *BossGanondrof
VB_PHANTOM_GANON_DEATH_SCENE, VB_PHANTOM_GANON_DEATH_SCENE,
// Opt: *EnIk
VB_NABOORU_KNUCKLE_DEATH_SCENE, VB_NABOORU_KNUCKLE_DEATH_SCENE,
/*** Fishsanity ***/ /*** Fishsanity ***/

View File

@ -619,7 +619,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
*should = false; *should = false;
BossGanondrof* pg = va_arg(args, BossGanondrof*); BossGanondrof* pg = va_arg(args, BossGanondrof*);
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
if (pg != nullptr && pg->work[GND_ACTION_STATE] == DEATH_SPASM) { if (pg->work[GND_ACTION_STATE] == DEATH_SPASM) {
// Skip to death scream animation and move ganondrof to middle // Skip to death scream animation and move ganondrof to middle
pg->deathState = DEATH_SCREAM; pg->deathState = DEATH_SCREAM;
pg->timers[0] = 50; pg->timers[0] = 50;

View File

@ -966,7 +966,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
bodyDecayLevel = 1; bodyDecayLevel = 1;
break; break;
} }
if (GameInteractor_Should(VB_PHANTOM_GANON_DEATH_SCENE, true)) { if (GameInteractor_Should(VB_PHANTOM_GANON_DEATH_SCENE, true, this)) {
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8); Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
Math_ApproachF(&this->cameraNextEye.z, this->targetPos.z + 60.0f, 0.02f, 0.5f); Math_ApproachF(&this->cameraNextEye.z, this->targetPos.z + 60.0f, 0.02f, 0.5f);
Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 133.0f, 0.05f, 100.0f); Math_ApproachF(&this->actor.world.pos.y, GND_BOSSROOM_CENTER_Y + 133.0f, 0.05f, 100.0f);