changeset 2932:1e154deb5e2e draft

(svn r3488) Simplify the check in r3419
author tron <tron@openttd.org>
date Mon, 30 Jan 2006 16:57:47 +0000
parents 9d5731650265
children 52de2ad82de2
files vehicle.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vehicle.c
+++ b/vehicle.c
@@ -129,7 +129,7 @@
 	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;