ER - Shabom timer fix (#2110)

This commit is contained in:
aMannus 2022-12-08 00:16:08 +01:00 committed by GitHub
parent 924e9147aa
commit b593e27384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -32,7 +32,13 @@ void ObjRoomtimer_Init(Actor* thisx, PlayState* play) {
ObjRoomtimer* this = (ObjRoomtimer*)thisx;
s16 params = this->actor.params;
this->switchFlag = (params >> 10) & 0x3F;
// Shabom room in Jabu Jabu has a lengthened timer in Enemy Randomizer. Flag doesn't match what the game
// expects. Instead set it back to the same flag as what it would be in vanilla.
if (CVar_GetS32("gRandomizedEnemies", 0) && play->sceneNum == SCENE_BDAN && play->roomCtx.curRoom.num == 12) {
this->switchFlag = 30;
} else {
this->switchFlag = (params >> 10) & 0x3F;
}
this->actor.params = params & 0x3FF;
params = this->actor.params;