Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-08-08 15:35:25 +02:00
26 changed files with 1158 additions and 68 deletions

View File

@@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/.
#include "simulation.h"
#include "simulationtime.h"
#include "scenenodegroups.h"
#include "particles.h"
#include "Event.h"
#include "Driver.h"
#include "DynObj.h"
@@ -369,6 +370,16 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
// vehicle import can potentially fail
if( vehicle == nullptr ) { return; }
//
if( vehicle->mdModel != nullptr ) {
for( auto const &smokesource : vehicle->mdModel->smoke_sources() ) {
Particles.insert(
smokesource.first,
vehicle,
smokesource.second );
}
}
if( false == simulation::Vehicles.insert( vehicle ) ) {
ErrorLog( "Bad scenario: duplicate vehicle name \"" + vehicle->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );