mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r24183) -Fix [FS#5169]: Town radii were not updated immediatelly after construction/destruction of houses, resulting in desyncs.
This commit is contained in:
parent
2c056677f5
commit
4fda069104
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user