summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authoraMannus <mannusmenting@gmail.com>2023-09-26 15:46:10 +0200
committerGitHub <noreply@github.com>2023-09-26 08:46:10 -0500
commit5d3429e04f2fedaa5ee194a3f48c23f736815bd8 (patch)
tree85cb1786ad9d5d3986ca74415a1f70d7b1cc2a51 /soh/src/code
parentdb10864e95d993a9f5389f31f61d441fb4ccba0c (diff)
CrowdControl bypass voidout/die crash in pre-rendered background areas (#3186)
* Bypass camera crash when voiding/dying in fixed camera areas * Update comment
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_room.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c
index 72b163ef7..81fe2714b 100644
--- a/soh/src/code/z_room.c
+++ b/soh/src/code/z_room.c
@@ -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;
}