From 7aa4925ccb632c1a2289335bccd4862e46e10781 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 11 Aug 2013 15:33:46 +0300 Subject: [PATCH] Immediately update rods when a vehicle is created The initial positions are not guaranteed to, and usually do not satisfy the constraints. --- source/libr2c2/vehicle.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.43.0