16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 09:59:18 +02:00

Merge branch 'master' of https://github.com/tmj-fstate/maszyna into milek-dev

This commit is contained in:
milek7
2019-08-08 00:37:04 +02:00
23 changed files with 1151 additions and 69 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"
@@ -53,6 +54,7 @@ state_serializer::deserialize( std::string const &Scenariofile ) {
// as long as the scenario file wasn't rainsted-created base file override
Region->serialize( Scenariofile );
}
return true;
}
@@ -361,6 +363,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 ) + ")" );