mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
passed by constructor.
This commit is contained in:
parent
1b93c89c28
commit
18b77cd003
@ -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<lod>(p3d_lod, model);
|
||||
|
@ -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;
|
||||
|
@ -110,12 +110,10 @@ namespace ace {
|
||||
}
|
||||
|
||||
if (ace::model_collection::get().load_model(model_str)) {
|
||||
std::shared_ptr<ace::simulation::object> _object = std::make_shared<ace::simulation::object>(model_collection::get().models[model_str].model);
|
||||
std::shared_ptr<ace::simulation::object> _object = std::make_shared<ace::simulation::object>(model_collection::get().models[model_str].model, (static_cast<int>(_args[2]) != 0 ? true : false));
|
||||
vehicle_p _vehicle = std::make_shared<vehicle>(static_cast<uint32_t>(_args[1]), _object, _args[2]);
|
||||
vehicles[static_cast<uint32_t>(_args[1])] = _vehicle;
|
||||
|
||||
_vehicle->object->reversed = (static_cast<int>(_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;
|
||||
|
Loading…
Reference in New Issue
Block a user