From 60b9b0add2aa446fb058e26fdf7d615887cf2e42 Mon Sep 17 00:00:00 2001 From: Deokishisu <6993375+Deokishisu@users.noreply.github.com> Date: Tue, 9 Feb 2021 11:20:52 -0500 Subject: 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. --- src/trainer_tower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/trainer_tower.c b/src/trainer_tower.c index 36468a34d..fd10e33b2 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -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 -- cgit v1.2.3