Don't save TNNC chunk if there are no town zone callback handlers

This commit is contained in:
Jonathan G Rennison
2023-03-16 20:52:44 +00:00
parent 062d57eadb
commit 5dd285b0d9
2 changed files with 12 additions and 1 deletions

View File

@@ -22,6 +22,8 @@
static bool _town_zone_radii_no_update = false;
extern bool IsGetTownZonesCallbackHandlerPresent();
HouseID SLGetCleanHouseType(TileIndex t, bool old_map_position)
{
if (old_map_position && SlXvIsFeatureMissing(XSLFI_MORE_HOUSES)) {
@@ -375,7 +377,7 @@ void SlResetTNNC()
void Save_TNNC()
{
if (!IsNetworkServerSave()) {
if (!IsNetworkServerSave() || !IsGetTownZonesCallbackHandlerPresent()) {
SlSetLength(0);
return;
}