Restore 1.0 quick Bongo kill glitch (#2641)

* Restore 1.0 quick Bongo kill glitch

* Address review comments
This commit is contained in:
RaelCappra 2023-03-22 21:59:44 -03:00 committed by GitHub
parent 7f5f4251ca
commit c9c7fc7df6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -853,6 +853,8 @@ namespace GameMenuBar {
UIWidgets::PaddedEnhancementCheckbox("Quick Putaway", "gQuickPutaway", true, false); UIWidgets::PaddedEnhancementCheckbox("Quick Putaway", "gQuickPutaway", true, false);
UIWidgets::Tooltip("Restore a bug from NTSC 1.0 that allows putting away an item without an animation and performing Putaway Ocarina Items"); UIWidgets::Tooltip("Restore a bug from NTSC 1.0 that allows putting away an item without an animation and performing Putaway Ocarina Items");
UIWidgets::PaddedEnhancementCheckbox("Restore old Gold Skulltula cutscene", "gGsCutscene", true, false); UIWidgets::PaddedEnhancementCheckbox("Restore old Gold Skulltula cutscene", "gGsCutscene", true, false);
UIWidgets::PaddedEnhancementCheckbox("Quick Bongo Kill", "gQuickBongoKill", true, false);
UIWidgets::Tooltip("Restore a bug from NTSC 1.0 that allows bypassing Bongo Bongo's intro cutscene to quickly kill him");
ImGui::EndMenu(); ImGui::EndMenu();
} }

View File

@ -356,12 +356,21 @@ void BossSst_HeadSetupLurk(BossSst* this) {
} }
void BossSst_HeadLurk(BossSst* this, PlayState* play) { void BossSst_HeadLurk(BossSst* this, PlayState* play) {
if (CVarGetInteger("gQuickBongoKill", 0)) {
this->colliderCyl.base.acFlags |= AC_ON;
}
if (this->actor.yDistToPlayer < 1000.0f) { if (this->actor.yDistToPlayer < 1000.0f) {
BossSst_HeadSetupIntro(this, play); BossSst_HeadSetupIntro(this, play);
} }
} }
void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
//Make sure to restore original behavior if the quick kill didn't happen
if (CVarGetInteger("gQuickBongoKill", 0)) {
this->colliderCyl.base.acFlags &= ~AC_ON;
}
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
this->timer = 611; this->timer = 611;
@ -2649,7 +2658,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
} }
if ((this->actionFunc != BossSst_HeadLurk) && (this->actionFunc != BossSst_HeadIntro)) { if ((this->actionFunc != BossSst_HeadLurk || CVarGetInteger("gQuickBongoKill", 0)) && (this->actionFunc != BossSst_HeadIntro)) {
if (this->colliderCyl.base.acFlags & AC_ON) { if (this->colliderCyl.base.acFlags & AC_ON) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
} }