summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-02-14 17:04:06 +0000
committermichi_cc <michi_cc@openttd.org>2012-02-14 17:04:06 +0000
commitf2c694c8fbfb775dc239ab1c6447d3744d1c84c7 (patch)
treeaf7e8b3e3689ad2e9e0db8ef56a8c7ea7521b373 /src/vehicle.cpp
parent347157cb8ce016428275d6143b555de1dc802133 (diff)
downloadopenttd-f2c694c8fbfb775dc239ab1c6447d3744d1c84c7.tar.xz
(svn r23947) -Feature: Timetabled maximum travel speeds for non-flying vehicles.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index f40f5070e..c6abc3f25 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2202,7 +2202,9 @@ void Vehicle::ShowVisualEffect() const
}
max_speed = min(max_speed, t->gcache.cached_max_track_speed);
+ max_speed = min(max_speed, this->current_order.max_speed);
}
+ if (this->type == VEH_ROAD || this->type == VEH_SHIP) max_speed = min(max_speed, this->current_order.max_speed * 2);
const Vehicle *v = this;