diff options
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 1e94d7387..9d7d78143 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1370,7 +1370,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) if (v->type == VEH_TRAIN) { /* Each platform tile is worth 2 rail vehicles. */ - int overhang = Train::From(v)->tcache.cached_total_length - st->GetPlatformLength(v->tile) * TILE_SIZE; + int overhang = v->GetGroundVehicleCache()->cached_total_length - st->GetPlatformLength(v->tile) * TILE_SIZE; if (overhang > 0) { unloading_time <<= 1; unloading_time += (overhang * unloading_time) / 8; |