From 48b7916458de4b2cdbc226a4a6ab078db4c77e73 Mon Sep 17 00:00:00 2001 From: terkhen Date: Tue, 14 Dec 2010 21:33:53 +0000 Subject: (svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains. --- src/economy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/economy.cpp') 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; -- cgit v1.2.3-54-g00ecf