Fix Trainer Tower Magic Number

A magic number was missed that will lead to edited projects breaking the Trainer Tower if new map layouts are added. This commit fixes it.
This commit is contained in:
Deokishisu
2021-02-09 11:20:52 -05:00
committed by GitHub
parent efba18bb0b
commit 60b9b0add2
+1 -1
View File
@@ -508,7 +508,7 @@ static void SetUpTrainerTowerDataStruct(void) // fakematching
const struct TrainerTowerFloor *const * r7;
sTrainerTowerState = AllocZeroed(sizeof(*sTrainerTowerState));
sTrainerTowerState->floorIdx = gMapHeader.mapLayoutId - 42;
sTrainerTowerState->floorIdx = gMapHeader.mapLayoutId - LAYOUT_TRAINER_TOWER_1F;
if (ReadTrainerTowerAndValidate() == TRUE)
CEReaderTool_LoadTrainerTower(&sTrainerTowerState->unk_0004);
else