summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-01-30 16:57:47 +0000
committertron <tron@openttd.org>2006-01-30 16:57:47 +0000
commit7d03773383abefeb1d8e60a4afeb07efc5f589bd (patch)
tree368dcdfbc23d2d01647f66f4bae0c812d918217e
parent2f668b8669dfe9a74f060bee22e93b8f5b8088ce (diff)
downloadopenttd-7d03773383abefeb1d8e60a4afeb07efc5f589bd.tar.xz
(svn r3488) Simplify the check in r3419
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index c139387c2..0424b4768 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -129,7 +129,7 @@ static void *EnsureNoVehicleProcZ(Vehicle *v, void *data)
const TileInfo *ti = data;
if (v->tile != ti->tile || v->type == VEH_Disaster) return NULL;
- if (v->z_pos != ti->z && abs(ti->z - v->z_pos) >= 8) return NULL;
+ if (!IS_INT_INSIDE(ti->z - v->z_pos, 0, 8)) return NULL;
VehicleInTheWayErrMsg(v);
return v;