X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Flibr2c2%2Fvehicle.cpp;h=dee1e762239837164b7bdaed7b422e168eeff0be;hb=d405b9943c888e3945c7ea4e496f9d300b114fe0;hp=02fb1afce6d4c719367560d3dbf677e208b1c795;hpb=26a8dbeae14c685c6aef1aad3aa75c6f1a75e458;p=r2c2.git diff --git a/source/libr2c2/vehicle.cpp b/source/libr2c2/vehicle.cpp index 02fb1af..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; @@ -247,7 +248,7 @@ void Vehicle::propagate_backward() void Vehicle::check_sensor(const TrackOffsetIter &t, unsigned &sensor, bool release) { - unsigned s = t->get_sensor_id(); + unsigned s = t->get_sensor_address(); if(s!=sensor) { unsigned old = sensor;