From 18b77cd0036a145e5e593929596fdba5948dd65f Mon Sep 17 00:00:00 2001 From: jaynus Date: Fri, 15 May 2015 22:56:43 -0700 Subject: [PATCH] passed by constructor. --- extensions/common/simulation/object.cpp | 2 +- extensions/common/simulation/object.hpp | 2 +- extensions/vd/controller.cpp | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/common/simulation/object.cpp b/extensions/common/simulation/object.cpp index b9bdd7ed8e..933c24b3f0 100644 --- a/extensions/common/simulation/object.cpp +++ b/extensions/common/simulation/object.cpp @@ -387,7 +387,7 @@ ace::simulation::object::object() { } -ace::simulation::object::object(const ace::p3d::model_p model) : reversed(false) +ace::simulation::object::object(const ace::p3d::model_p model, bool reverse_ = false) : reversed(reverse_) { for (ace::p3d::lod_p p3d_lod : model->lods) { lod_p new_lod = std::make_shared(p3d_lod, model); diff --git a/extensions/common/simulation/object.hpp b/extensions/common/simulation/object.hpp index 68faddbd13..f361d7d343 100644 --- a/extensions/common/simulation/object.hpp +++ b/extensions/common/simulation/object.hpp @@ -202,7 +202,7 @@ namespace ace { class object { public: object(); - object(const ace::p3d::model_p); + object(const ace::p3d::model_p, bool reversed); ~object(); bool reversed; diff --git a/extensions/vd/controller.cpp b/extensions/vd/controller.cpp index 11325d5c5c..9e6b50739a 100644 --- a/extensions/vd/controller.cpp +++ b/extensions/vd/controller.cpp @@ -110,12 +110,10 @@ namespace ace { } if (ace::model_collection::get().load_model(model_str)) { - std::shared_ptr _object = std::make_shared(model_collection::get().models[model_str].model); + std::shared_ptr _object = std::make_shared(model_collection::get().models[model_str].model, (static_cast(_args[2]) != 0 ? true : false)); vehicle_p _vehicle = std::make_shared(static_cast(_args[1]), _object, _args[2]); vehicles[static_cast(_args[1])] = _vehicle; - _vehicle->object->reversed = (static_cast(_args[2]) != 0 ? true : false); - // For results on a valid vehicle registration, we return its animation names for that given vehicle std::stringstream _animationNames; _animationNames << _vehicle->id;