Allow players to disable the Gorgon's screen flashes

This commit is contained in:
Kiloku 2025-01-12 23:53:56 -03:00 committed by Lywx
parent 96b0a07023
commit 3bef25f9b6
3 changed files with 15 additions and 3 deletions

View File

@ -3786,7 +3786,9 @@ void Effect_Effect395_Update(Effect395* this) {
D_ctx_801779A8[0] = 50.0f; D_ctx_801779A8[0] = 50.0f;
if (this->unk_46 == 10) { if (this->unk_46 == 10) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
if (CVarGetInteger("gDisableGorgonFlash", 0) == 0){
gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255;
}
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25; gFillScreenAlphaStep = 25;
gCameraShake = 50; gCameraShake = 50;

View File

@ -830,8 +830,10 @@ void Area6_A6Gorgon_Update(A6Gorgon* this) {
case 2: case 2:
Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f);
if (this->timer_050 == 10) { if (this->timer_050 == 10) {
if (CVarGetInteger("gDisableGorgonFlash", 0) == 0) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255;
}
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25; gFillScreenAlphaStep = 25;
gCameraShake = 50; gCameraShake = 50;

View File

@ -542,6 +542,14 @@ void DrawEnhancementsMenu() {
ImGui::EndMenu(); ImGui::EndMenu();
} }
if (UIWidgets::BeginMenu("Accessibility")) {
UIWidgets::CVarCheckbox("Disable Gorgon (Area 6 boss) screen flashes", "gDisableGorgonFlash", {
.tooltip = "Gorgon flashes the screen repeatedly when firing its beam or when teleporting, which causes eye pain for some players and may be harmful to those with photosensitivity.",
.defaultValue = false
});
ImGui::EndMenu();
}
ImGui::EndMenu(); ImGui::EndMenu();
} }
} }