summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-02-09 11:20:52 -0500
committerGitHub <noreply@github.com>2021-02-09 11:20:52 -0500
commit60b9b0add2aa446fb058e26fdf7d615887cf2e42 (patch)
tree43441de8378dc3b6092bdaf05b4c966d3cc4a4a9 /src
parentefba18bb0bc1e919b13d1b6421011f94b409e33f (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/trainer_tower.c2
1 files changed, 1 insertions, 1 deletions
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