Skip to content

Commit

Permalink
Fix chest spawns being decorated if they are not supposed to be. (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico authored Feb 26, 2024
1 parent 1231956 commit cdd5e65
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/source/rnd/chest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ namespace rnd {
s16 gid = (actor->dyna.params << 0x14) >> 0x19;
if (gid == 0x3C && gSettingsContext.chestSize == 0)
return false;
if (gid == 0x3C && gSettingsContext.chestSize == 1 && chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL)
if (gid == 0x3C && gSettingsContext.chestSize == 1 &&
(chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL ||
chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL_ROOM_CLEAR ||
chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL_SWITCH_FLAG))
return true;
else if (chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL)
else if (chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL ||
chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL_ROOM_CLEAR ||
chestType == (u16)game::actors::EnBoxType::ENBOX_TYPE_SMALL_SWITCH_FLAG)
return true;
else
return false;
Expand Down

0 comments on commit cdd5e65

Please sign in to comment.