From da5661a0c8870c532c393ec3d330c3fbb44eb8ac Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 May 2009 22:55:41 +0000 Subject: (svn r16393) -Codechange: move VehicleRail to Train. --- src/yapf/yapf_costrail.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yapf/yapf_costrail.hpp') diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp index 6eefc08c0..2d6d78191 100644 --- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -247,8 +247,8 @@ public: const Vehicle *v = Yapf().GetVehicle(); assert(v != NULL); assert(v->type == VEH_TRAIN); - assert(v->u.rail.cached_total_length != 0); - int missing_platform_length = (v->u.rail.cached_total_length + TILE_SIZE - 1) / TILE_SIZE - platform_length; + assert(((Train *)v)->tcache.cached_total_length != 0); + int missing_platform_length = (((Train *)v)->tcache.cached_total_length + TILE_SIZE - 1) / TILE_SIZE - platform_length; if (missing_platform_length < 0) { /* apply penalty for longer platform than needed */ cost += Yapf().PfGetSettings().rail_longer_platform_penalty + Yapf().PfGetSettings().rail_longer_platform_per_tile_penalty * -missing_platform_length; -- cgit v1.2.3-70-g09d2