From: Mikko Rasa Date: Sun, 11 Aug 2013 12:33:46 +0000 (+0300) Subject: Immediately update rods when a vehicle is created X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7aa4925ccb632c1a2289335bccd4862e46e10781;p=r2c2.git Immediately update rods when a vehicle is created The initial positions are not guaranteed to, and usually do not satisfy the constraints. --- diff --git a/source/libr2c2/vehicle.cpp b/source/libr2c2/vehicle.cpp index 2ad7166..79e3cbe 100644 --- a/source/libr2c2/vehicle.cpp +++ b/source/libr2c2/vehicle.cpp @@ -33,6 +33,8 @@ Vehicle::Vehicle(Layout &l, const VehicleType &t): for(unsigned j=0; jaxles.size(); ++j) i->axles[j] = &axles[i->type->first_axle+j]; + update_rods(); + layout.add(*this); }