train_gui.c
changeset 2032 64481deacfb1
parent 1986 5dd3db2b86d7
child 2049 ad0d49c916d4
--- a/train_gui.c	Sat Jul 09 17:45:57 2005 +0000
+++ b/train_gui.c	Sun Jul 10 01:25:17 2005 +0000
@@ -160,7 +160,7 @@
 		const Engine *e = GetEngine(i);
 		const RailVehicleInfo *rvi = RailVehInfo(i);
 
-		if (e->railtype != railtype || !(rvi->flags & RVI_WAGON) != is_engine ||
+		if (!IsCompatibleRail(railtype, e->railtype) || !(rvi->flags & RVI_WAGON) != is_engine ||
 				!HASBIT(e->player_avail, _local_player))
 			continue;
 
@@ -192,7 +192,7 @@
 
 			for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
 				const Engine *e = GetEngine(i);
-				if (e->railtype == railtype
+				if (IsCompatibleRail(railtype, e->railtype)
 				    && HASBIT(e->player_avail, _local_player))
 					count++;
 			}