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 b97e8df55..8ac68e8b9 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1519,7 +1519,7 @@ int LoadUnloadVehicle(Vehicle *v, bool just_arrived)
if (v->type == VEH_Train) {
// Each platform tile is worth 2 rail vehicles.
- int overhang = v->u.rail.cached_total_length - GetStationPlatforms(st, v->tile) * TILE_SIZE;
+ int overhang = v->u.rail.cached_total_length - st->GetPlatformLength(v->tile) * TILE_SIZE;
if (overhang > 0) {
unloading_time <<= 1;
unloading_time += (overhang * unloading_time) / 8;