Load gCitiesLimitFix state before it is used

This commit is contained in:
Vasilii Rogin 2024-04-18 23:23:41 +03:00
parent db07e95f5b
commit ea66287551
1 changed files with 6 additions and 7 deletions

View File

@ -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