CrowdControl bypass voidout/die crash in pre-rendered background areas (#3186)

* Bypass camera crash when voiding/dying in fixed camera areas

* Update comment
This commit is contained in:
aMannus 2023-09-26 15:46:10 +02:00 committed by GitHub
parent db10864e95
commit 5d3429e04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -403,9 +403,10 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
camera = GET_ACTIVE_CAM(play);
camId = camera->camDataIdx;
if (camId == -1 && CVarGetInteger("gNoRestrictItems", 0)) {
if (camId == -1 && (CVarGetInteger("gNoRestrictItems", 0) || CVarGetInteger("gCrowdControl", 0))) {
// This prevents a crash when using items that change the
// camera (such as din's fire) on scenes with prerendered backgrounds
// camera (such as din's fire), voiding out or dying on
// scenes with prerendered backgrounds.
return NULL;
}