(svn r24183) -Fix [FS#5169]: Town radii were not updated immediatelly after construction/destruction of houses, resulting in desyncs.

This commit is contained in:
frosch 2012-04-26 21:04:18 +00:00
parent 2c056677f5
commit 4fda069104

View File

@ -769,8 +769,6 @@ static void TownTickHandler(Town *t)
}
t->grow_counter = i;
}
UpdateTownRadius(t);
}
void OnTick_Town()
@ -2304,6 +2302,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
}
MakeTownHouse(tile, t, construction_counter, construction_stage, house, random_bits);
UpdateTownRadius(t);
UpdateTownCargoes(t, tile);
return true;
@ -2387,6 +2386,8 @@ void ClearTownHouse(Town *t, TileIndex tile)
if (eflags & BUILDING_2_TILES_X) DoClearTownHouseHelper(tile + TileDiffXY(1, 0), t, ++house);
if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1), t, ++house);
UpdateTownRadius(t);
/* Update cargo acceptance. */
UpdateTownCargoes(t, tile);
}