ship_cmd.c
changeset 159 139cf78bfb28
parent 156 8fef5e5752d6
child 164 0cbdf3c9bde1
--- a/ship_cmd.c	Sun Sep 05 14:20:36 2004 +0000
+++ b/ship_cmd.c	Sun Sep 05 16:15:22 2004 +0000
@@ -15,7 +15,7 @@
 static const byte _ship_sometracks[4] = {0x19, 0x16, 0x25, 0x2A};
 
 static byte GetTileShipTrackStatus(uint tile) {
-	uint32 r = GetTileTrackStatus(tile, 4);
+	uint32 r = GetTileTrackStatus(tile, TRANSPORT_WATER);
 	return r | r >> 8;
 }
 
@@ -492,7 +492,7 @@
 		pfs.best_bird_dist = (uint)-1;
 		pfs.best_length = (uint)-1;
 
-		FollowTrack(tile, 0x3804, _ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
+		FollowTrack(tile, 0x3800 | TRANSPORT_WATER, _ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
 		
 		if (best_track >= 0) {
 			if (pfs.best_bird_dist != 0) {
@@ -569,7 +569,7 @@
 
 static int GetAvailShipTracks(uint tile, int dir)
 {
-	uint32 r = GetTileTrackStatus(tile, 4);
+	uint32 r = GetTileTrackStatus(tile, TRANSPORT_WATER);
 	return (byte) ((r | r >> 8)) & _ship_sometracks[dir];
 }