summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-11-06 13:05:11 +0000
committerterkhen <terkhen@openttd.org>2010-11-06 13:05:11 +0000
commit18e3a3ddfc7c9eee4d1023485a4c23b3cc40fbb3 (patch)
tree719e279d32005d7032a509a6aea06ab70124a667 /src/economy.cpp
parent25d1b2f54b9cac01e2737848c208f6d8096a4a92 (diff)
downloadopenttd-18e3a3ddfc7c9eee4d1023485a4c23b3cc40fbb3.tar.xz
(svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index ecccc99a1..ebeb4384c 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1232,8 +1232,15 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
case VEH_SHIP:
t = u->vcache.cached_max_speed;
break;
- case VEH_ROAD: t = u->max_speed / 2; break;
- case VEH_AIRCRAFT: t = Aircraft::From(u)->GetSpeedOldUnits(); break; // Convert to old units.
+
+ case VEH_ROAD:
+ t = u->vcache.cached_max_speed / 2;
+ break;
+
+ case VEH_AIRCRAFT:
+ t = Aircraft::From(u)->GetSpeedOldUnits(); // Convert to old units.
+ break;
+
default: NOT_REACHED();
}