Fix changing town zone settings not updating town zone radii

This could cause MP desyncs
This commit is contained in:
Jonathan G Rennison
2022-11-01 18:17:27 +00:00
parent 95a646d09b
commit 94de25ec10
4 changed files with 32 additions and 7 deletions

View File

@@ -1265,11 +1265,6 @@ static void SpriteZoomMinChanged(int32 new_value)
MarkWholeScreenDirty();
}
static void InvalidateSettingsWindow(int32 new_value)
{
InvalidateWindowClassesData(WC_GAME_OPTIONS);
}
static void DeveloperModeChanged(int32 new_value)
{
DebugReconsiderSendRemoteMessages();
@@ -1695,6 +1690,17 @@ static void DayLengthChanged(int32 new_value)
MarkWholeScreenDirty();
}
static void TownZoneModeChanged(int32 new_value)
{
InvalidateWindowClassesData(WC_GAME_OPTIONS);
UpdateTownRadii();
}
static void TownZoneCustomValueChanged(int32 new_value)
{
if (_settings_game.economy.town_zone_calc_mode) UpdateTownRadii();
}
/**
* Replace a passwords that are a literal asterisk with an empty string.
* @param newval The new string value for this password field.