Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Enemy Randomizer wrongly set flags #2253

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down