diff options
author | tron <tron@openttd.org> | 2005-09-28 19:35:36 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-09-28 19:35:36 +0000 |
commit | ce1c72cf6ece7b5aaa0bac1a546efa55bdc851db (patch) | |
tree | fabd4f30d2f27b1466d0b8f0c8737b900cf5634c /industry_cmd.c | |
parent | 6249dd46ad3b1b23ae959f57a0def00cf98dd8ee (diff) | |
download | openttd-ce1c72cf6ece7b5aaa0bac1a546efa55bdc851db.tar.xz |
(svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index ea11fd1ee..ff24f6711 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -1406,14 +1406,14 @@ static bool CheckIfTooCloseToIndustry(TileIndex tile, int type) spec = &_industry_spec[type]; // accepting industries won't be close, not even with patch - if (_patches.same_industry_close && (spec->accepts_cargo[0] == 0xFF) ) + if (_patches.same_industry_close && spec->accepts_cargo[0] == CT_INVALID) return true; FOR_ALL_INDUSTRIES(i) { // check if an industry that accepts the same goods is nearby if (i->xy != 0 && (DistanceMax(tile, i->xy) <= 14) && - spec->accepts_cargo[0] != 0xFF && + spec->accepts_cargo[0] != CT_INVALID && spec->accepts_cargo[0] == i->accepts_cargo[0] && !(_game_mode == GM_EDITOR && _patches.same_industry_close && @@ -1754,7 +1754,7 @@ static void UpdateIndustryStatistics(Industry *i) { byte pct; - if (i->produced_cargo[0] != 0xFF) { + if (i->produced_cargo[0] != CT_INVALID) { pct = 0; if (i->last_mo_production[0] != 0) { i->last_prod_year = _cur_year; @@ -1769,7 +1769,7 @@ static void UpdateIndustryStatistics(Industry *i) i->last_mo_transported[0] = 0; } - if (i->produced_cargo[1] != 0xFF) { + if (i->produced_cargo[1] != CT_INVALID) { pct = 0; if (i->last_mo_production[1] != 0) { i->last_prod_year = _cur_year; @@ -1785,7 +1785,7 @@ static void UpdateIndustryStatistics(Industry *i) } - if ( i->produced_cargo[0] != 0xFF || i->produced_cargo[1] != 0xFF ) + if (i->produced_cargo[0] != CT_INVALID || i->produced_cargo[1] != CT_INVALID) InvalidateWindow(WC_INDUSTRY_VIEW, i->index); if (i->prod_level == 0) |