Always call UpdateTownCargoTotal in UpdateTownCargoes
This commit is contained in:
@@ -1009,12 +1009,12 @@ void UpdateTownCargoes(Town *t)
|
|||||||
t->cargo_produced = 0;
|
t->cargo_produced = 0;
|
||||||
|
|
||||||
const TileArea &area = t->cargo_accepted.GetArea();
|
const TileArea &area = t->cargo_accepted.GetArea();
|
||||||
if (area.tile == INVALID_TILE) return;
|
if (area.tile != INVALID_TILE) {
|
||||||
|
|
||||||
/* Update acceptance for each grid square. */
|
/* Update acceptance for each grid square. */
|
||||||
TILE_AREA_LOOP_STEP(tile, area, AcceptanceMatrix::GRID) {
|
TILE_AREA_LOOP_STEP(tile, area, AcceptanceMatrix::GRID) {
|
||||||
UpdateTownCargoesSingleGridArea(t, tile, false);
|
UpdateTownCargoesSingleGridArea(t, tile, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Update the total acceptance. */
|
/* Update the total acceptance. */
|
||||||
UpdateTownCargoTotal(t);
|
UpdateTownCargoTotal(t);
|
||||||
|
Reference in New Issue
Block a user