(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user