(svn r21156) -Codechange: Introduce EconomyIsInRecession().

This commit is contained in:
alberth
2010-11-13 09:45:20 +00:00
parent aea8274dba
commit 43f807a918
5 changed files with 15 additions and 6 deletions

View File

@@ -508,7 +508,7 @@ static void TileLoop_Object(TileIndex tile)
/* Top town buildings generate 250, so the top HQ type makes 256. */
if (GB(r, 0, 8) < (256 / 4 / (6 - level))) {
uint amt = GB(r, 0, 8) / 8 / 4 + 1;
if (_economy.fluct <= 0) amt = (amt + 1) >> 1;
if (EconomyIsInRecession()) amt = (amt + 1) >> 1;
MoveGoodsToStation(CT_PASSENGERS, amt, ST_HEADQUARTERS, GetTileOwner(tile), stations.GetStations());
}
@@ -517,7 +517,7 @@ static void TileLoop_Object(TileIndex tile)
* equations. */
if (GB(r, 8, 8) < (196 / 4 / (6 - level))) {
uint amt = GB(r, 8, 8) / 8 / 4 + 1;
if (_economy.fluct <= 0) amt = (amt + 1) >> 1;
if (EconomyIsInRecession()) amt = (amt + 1) >> 1;
MoveGoodsToStation(CT_MAIL, amt, ST_HEADQUARTERS, GetTileOwner(tile), stations.GetStations());
}
}