Always call UpdateTownCargoTotal in UpdateTownCargoes

This commit is contained in:
Jonathan G Rennison
2019-08-19 20:15:05 +01:00
parent 2105d21356
commit a8786632f7

View File

@@ -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);