From ea66287551042fa4b1d461a6384320f4c2d18cba Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Thu, 18 Apr 2024 23:23:41 +0300 Subject: [PATCH] Load gCitiesLimitFix state before it is used --- src/worldmap.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/worldmap.cc b/src/worldmap.cc index f281dea..a828d6d 100644 --- a/src/worldmap.cc +++ b/src/worldmap.cc @@ -839,6 +839,12 @@ static void wmSetFlags(int* flagsPtr, int flag, int value) // 0x4BC89C int wmWorldMap_init() { + // SFALL + gTownMapHotkeysFix = true; + configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_TOWN_MAP_HOTKEYS_FIX_KEY, &gTownMapHotkeysFix); + gCitiesLimitFix = true; + configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, &gCitiesLimitFix); + char path[COMPAT_MAX_PATH]; if (wmGenDataInit() == -1) { @@ -866,13 +872,6 @@ int wmWorldMap_init() wmMarkSubTileRadiusVisited(wmGenData.worldPosX, wmGenData.worldPosY); wmWorldMapSaveTempData(); - // SFALL - gTownMapHotkeysFix = true; - configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_TOWN_MAP_HOTKEYS_FIX_KEY, &gTownMapHotkeysFix); - - gCitiesLimitFix = true; - configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, &gCitiesLimitFix); - // CE: City size fids should be initialized during startup. They are used // during |wmTeleportToArea| to calculate worldmap position when jumping // from Temple to Arroyo - before giving a chance to |wmInterfaceInit| to