summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-23 19:35:36 +0000
committertron <tron@openttd.org>2006-04-23 19:35:36 +0000
commit6dbc9c9ced44d98abb8759593db92910f16292e4 (patch)
tree020949ed699a5b1e636d9d4da8e68db3751bf261 /vehicle.c
parentaac74778c5020c2f101d9012ab988418a870d7c0 (diff)
downloadopenttd-6dbc9c9ced44d98abb8759593db92910f16292e4.tar.xz
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle.c b/vehicle.c
index 9ab50af98..e2d19b081 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -131,7 +131,7 @@ static void *EnsureNoVehicleProcZ(Vehicle *v, void *data)
const TileInfo *ti = data;
if (v->tile != ti->tile || v->type == VEH_Disaster) return NULL;
- if (!IS_INT_INSIDE(ti->z - v->z_pos, 0, 8 + 1)) return NULL;
+ if (!IS_INT_INSIDE(ti->z - v->z_pos, 0, TILE_HEIGHT + 1)) return NULL;
VehicleInTheWayErrMsg(v);
return v;
@@ -140,7 +140,7 @@ static void *EnsureNoVehicleProcZ(Vehicle *v, void *data)
static inline uint Correct_Z(Slope tileh)
{
// needs z correction for slope-type graphics that have the NORTHERN tile lowered
- return CorrectZ(tileh) ? 8 : 0;
+ return CorrectZ(tileh) ? TILE_HEIGHT : 0;
}
uint GetCorrectTileHeight(TileIndex tile)