order_gui.c
changeset 319 1891d07574d6
parent 193 0a7025304867
child 395 4c990f33dab7
--- a/order_gui.c	Mon Sep 27 12:36:59 2004 +0000
+++ b/order_gui.c	Mon Sep 27 14:30:17 2004 +0000
@@ -169,9 +169,6 @@
 			if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
 				if ((_map5[tile]&0xFC)==0xC0)
 					return (GetDepotByTile(tile)<<8) | OT_GOTO_DEPOT | OF_UNLOAD;
-
-				if ((_map5[tile]&0xFE)==0xC4)
-					return (GetCheckpointByTile(tile)<<8) | OT_GOTO_CHECKPOINT;
 			}
 			break;
 
@@ -198,6 +195,13 @@
 		}
 	}
 
+	// check checkpoint
+	if (IS_TILETYPE(tile, MP_RAILWAY)
+	&& v->type == VEH_Train 
+	&& _map_owner[tile] == _local_player
+	&& (_map5[tile]&0xFE)==0xC4)
+		return (GetCheckpointByTile(tile)<<8) | OT_GOTO_CHECKPOINT;
+
 	if (IS_TILETYPE(tile, MP_STATION)) {
 		st = DEREF_STATION(st_index = _map2[tile]);