train_cmd.c
changeset 2456 93041d70867b
parent 2451 9b4d7f92e4ea
child 2463 de2605ed3758
--- a/train_cmd.c	Sat Sep 24 06:43:26 2005 +0000
+++ b/train_cmd.c	Sat Sep 24 13:56:39 2005 +0000
@@ -113,8 +113,9 @@
 		}
 
 		// max speed is the minimum of the speed limits of all vehicles in the consist
-		if (rvi_u->max_speed != 0 && !UsesWagonOverride(u))
-			max_speed = min(rvi_u->max_speed, max_speed);
+		if (!(rvi_u->flags & RVI_WAGON) || _patches.wagon_speed_limits)
+			if (rvi_u->max_speed != 0 && !UsesWagonOverride(u))
+				max_speed = min(rvi_u->max_speed, max_speed);
 
 		// check the vehicle length (callback)
 		veh_len = CALLBACK_FAILED;