summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-08-26 00:23:32 +0000
committerbelugas <belugas@openttd.org>2007-08-26 00:23:32 +0000
commit36c5b4e1ef8f15cc6a79447bc95cffef82d2eb32 (patch)
tree0f57c81b2cea7b7400fef85da190e3b2d551f3cc /src/industry_cmd.cpp
parentba69ac263295e61399dcc23d066b7399e3c3f32a (diff)
downloadopenttd-36c5b4e1ef8f15cc6a79447bc95cffef82d2eb32.tar.xz
(svn r10980) -Fix [FS#1158] : This will hopefully fix the case of an assert that happens when an industry uses a special gfx index (tile spec 0xFF). This 0xFF is the sentinel of a special check done for oil rigs, where water need to be around, but no tile will be constructed on it.
Problem is that the upper limit of gfx tiles is currently at 175. So, of course the system will assert with 255 ;)
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 1d5b2939d..ea9d8401d 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1183,11 +1183,11 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
if (!IsValidTile(cur_tile)) {
- if (gfx == 0xff) continue;
+ if (gfx == GFX_WATERTILE_SPECIALCHECK) continue;
return false;
}
- if (gfx == 0xFF) {
+ if (gfx == GFX_WATERTILE_SPECIALCHECK) {
if (!IsTileType(cur_tile, MP_WATER) ||
GetTileSlope(cur_tile, NULL) != SLOPE_FLAT) {
return false;
@@ -1452,7 +1452,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
do {
TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
- if (it->gfx != 0xFF) {
+ if (it->gfx != GFX_WATERTILE_SPECIALCHECK) {
byte size;
size = it->ti.x;