summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp2
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.