From bf062f5547dd77d73617e99df58c998f5806252e Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sun, 14 Feb 2021 03:51:38 -0500 Subject: [PATCH] [LEAK-INFORMED] fix battle dome fakematching yes they actually fucking did this --- src/battle_dome.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/battle_dome.c b/src/battle_dome.c index 780721768a..a9065d6bc0 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -5774,6 +5774,8 @@ static void InitRandomTourneyTreeResults(void) int monTypesBits; int trainerId; int monId; + int zero1; + int zero2; u8 lvlMode; u16 *statSums; int *statValues; @@ -5789,12 +5791,11 @@ static void InitRandomTourneyTreeResults(void) statValues = AllocZeroed(sizeof(int) * NUM_STATS); lvlMode = gSaveBlock2Ptr->frontier.lvlMode; gSaveBlock2Ptr->frontier.lvlMode = FRONTIER_LVL_50; - // This one, I'd like to call a 'C fakematching'. - { - u8 one; - gSaveBlock2Ptr->frontier.domeLvlMode = (one = 1); - gSaveBlock2Ptr->frontier.domeBattleMode = one; - } + zero1 = 0; + zero2 = 0; + + gSaveBlock2Ptr->frontier.domeLvlMode = tmp1 + 1; + gSaveBlock2Ptr->frontier.domeBattleMode = tmp2 + 1; for (i = 0; i < DOME_TOURNAMENT_TRAINERS_COUNT; i++) {