]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/vehicle.cpp
Update Track3D to use GL::Renderer
[r2c2.git] / source / libr2c2 / vehicle.cpp
index d52417a5c8ba0e99606b7ee754ca43cd5a2b2515..3fdc7a44c7a2722b7afa763dbf87aea182062a8f 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of R²C²
-Copyright © 2010  Mikkosoft Productions, Mikko Rasa
+Copyright © 2010-2011  Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -29,11 +29,11 @@ Vehicle::Vehicle(Layout &l, const VehicleType &t):
        front_sensor(0),
        back_sensor(0)
 {
-       layout.add_vehicle(*this);
-
        axles.assign(type.get_axles().begin(), type.get_axles().end());
        bogies.assign(type.get_bogies().begin(), type.get_bogies().end());
        rods.assign(type.get_rods().begin(), type.get_rods().end());
+
+       layout.add_vehicle(*this);
 }
 
 Vehicle::~Vehicle()