Fix enemy rando flags (#2253)

This commit is contained in:
aMannus 2022-12-24 04:27:01 +01:00 committed by GitHub
parent 99367ebb53
commit f6a7f3d13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -656,7 +656,9 @@ void func_80A75A38(EnIk* this, PlayState* play) {
}
if (this->unk_2F9 == 0) {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
if (this->switchFlags != 0xFF) {
// Don't set flag when Iron Knuckle is spawned by Enemy Rando.
// Instead Iron Knuckles rely on the "clear room" flag when Enemy Rando is on.
if (this->switchFlags != 0xFF && !CVar_GetS32("gRandomizedEnemies",0)) {
Flags_SetSwitch(play, this->switchFlags);
}
Actor_Kill(&this->actor);

View File

@ -663,7 +663,8 @@ void func_80AE3C98(EnRd* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->unk_30C == 0) {
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F)) {
// Don't set this flag in Enemy Rando as it can overlap with other objects using the same flag.
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F) && !CVar_GetS32("gRandomizedEnemies", 0)) {
Flags_SetSwitch(play, this->unk_312 & 0x7F);
}
if (this->unk_314 != 0) {