Sector Z: Missile cutscene bug restoration

This commit is contained in:
Sonic Dreamcaster 2024-11-24 20:08:22 -03:00
parent b23d224b9d
commit 16f4c15952
2 changed files with 18 additions and 2 deletions

View File

@ -182,11 +182,18 @@ void SectorZ_Missile_Update(ActorAllRange* this) {
}
}
s32 bugFixCond;
if (CVarGetInteger("gSzMissileBug", 0) == 1) {
bugFixCond = 0;
} else {
bugFixCond = (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR);
}
// Level complete trigger check
if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) &&
(((gPlayer[0].cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) &&
(((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) ||
bugFixCond)) &&
(((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || bugFixCond) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 100;

View File

@ -430,6 +430,7 @@ void DrawEnhancementsMenu() {
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Fixes")) {
UIWidgets::CVarCheckbox("Macbeth: Level ending cutscene camera fix", "gMaCameraFix", {
.tooltip = "Fixes a camera bug found in the code of the game"
@ -438,6 +439,14 @@ void DrawEnhancementsMenu() {
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Restoration")) {
UIWidgets::CVarCheckbox("Sector Z: Missile cutscene bug", "gSzMissileBug", {
.tooltip = "Restores the missile cutscene bug present in JP 1.0"
});
ImGui::EndMenu();
}
ImGui::EndMenu();
}
}