X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fvehicle.cpp;h=dee1e762239837164b7bdaed7b422e168eeff0be;hb=d405b9943c888e3945c7ea4e496f9d300b114fe0;hp=099644a1301ca8360101d894fec8c9d5c74a4fc3;hpb=d6816c177ee8d5f5191e833dce8e3c4e7e0222bf;p=r2c2.git diff --git a/source/libr2c2/vehicle.cpp b/source/libr2c2/vehicle.cpp index 099644a..dee1e76 100644 --- a/source/libr2c2/vehicle.cpp +++ b/source/libr2c2/vehicle.cpp @@ -175,7 +175,8 @@ void Vehicle::update_position(int sign) { OrientedPoint p = placement.get_point(); position = p.position; - position.z += layout.get_catalogue().get_rail_elevation(); + // TODO Move the z adjustment to VehiclePlacement + position.z += placement.get_position(VehiclePlacement::FRONT_AXLE)->get_type().get_appearance().get_rail_elevation(); rotation = p.rotation; tilt = p.tilt;