npf.c
changeset 3993 d1265b7ad360
parent 3977 edb5b94e2094
child 4000 bab1ebc37da0
--- a/npf.c	Fri Jun 09 09:31:48 2006 +0000
+++ b/npf.c	Fri Jun 09 14:37:28 2006 +0000
@@ -190,12 +190,12 @@
 	x = TileX(current->tile) * TILE_SIZE;
 	y = TileY(current->tile) * TILE_SIZE;
 	/* get the height of the center of the current tile */
-	z1 = GetSlopeZ(x+TILE_HEIGHT, y+TILE_HEIGHT);
+	z1 = GetSlopeZ(x + TILE_SIZE / 2, y + TILE_SIZE / 2);
 
 	x = TileX(next) * TILE_SIZE;
 	y = TileY(next) * TILE_SIZE;
 	/* get the height of the center of the next tile */
-	z2 = GetSlopeZ(x+TILE_HEIGHT, y+TILE_HEIGHT);
+	z2 = GetSlopeZ(x + TILE_SIZE / 2, y + TILE_SIZE / 2);
 
 	if (z2 - z1 > 1) {
 		/* Slope up */