diff options
author | terkhen <terkhen@openttd.org> | 2010-11-06 12:53:31 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-06 12:53:31 +0000 |
commit | c8a56f17f82be7d4a8e935fc514c86a313dc7d15 (patch) | |
tree | 4a2552f26ee887aa326721881fbbe6f62b8b48d2 /src/economy.cpp | |
parent | 78d0a1cb1af68863e3e7bfed584f4a94ee46f611 (diff) | |
download | openttd-c8a56f17f82be7d4a8e935fc514c86a313dc7d15.tar.xz |
(svn r21097) -Codechange: Unify cached max speed for all vehicle types.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 810e99701..f7326f4e2 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1228,7 +1228,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) /* update stats */ int t; switch (u->type) { - case VEH_TRAIN: t = Train::From(u)->tcache.cached_max_speed; break; + case VEH_TRAIN: t = u->vcache.cached_max_speed; break; case VEH_ROAD: t = u->max_speed / 2; break; case VEH_SHIP: t = u->max_speed; break; case VEH_AIRCRAFT: t = Aircraft::From(u)->GetSpeedOldUnits(); break; // Convert to old units. |