Initialize gSlotAgeReqs[SLOT_TRADE_CHILD] and gItemAgeReqs[ITEM_MASK_BUNNY] on load initialization according to gMMBunnyHood and gTimelessEquipment to prevent bunny hood from being unequipped from adult equips on first load. (#2904)
Move the code to change those values based on the child trade slot item to the selecting mask loop to not be setting them every frame just because you're in the inventory.
This commit is contained in:
@@ -604,6 +604,15 @@ void Play_Init(GameState* thisx) {
|
||||
(s32)(zAllocAligned + zAllocSize) - (s32)(zAllocAligned - zAlloc));
|
||||
|
||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||
// In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) || CVarGetInteger("gTimelessEquipment", 0)) {
|
||||
gItemAgeReqs[ITEM_MASK_BUNNY] = 9;
|
||||
if(INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY)
|
||||
gSlotAgeReqs[SLOT_TRADE_CHILD] = 9;
|
||||
}
|
||||
else {
|
||||
gItemAgeReqs[ITEM_MASK_BUNNY] = gSlotAgeReqs[SLOT_TRADE_CHILD] = 1;
|
||||
}
|
||||
func_800304DC(play, &play->actorCtx, play->linkActorEntry);
|
||||
|
||||
while (!func_800973FC(play, &play->roomCtx)) {
|
||||
|
||||
Reference in New Issue
Block a user