mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 12:19:18 +02:00
AI cruise control fix, minor refactoring
This commit is contained in:
@@ -305,7 +305,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
delete pathnode;
|
||||
*/
|
||||
}
|
||||
scene::Groups.register_node( path, scene::Groups.handle() );
|
||||
scene::Groups.insert( scene::Groups.handle(), path );
|
||||
simulation::Region->insert_and_register( path );
|
||||
}
|
||||
else if( nodedata.type == "traction" ) {
|
||||
@@ -317,7 +317,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
if( false == simulation::Traction.insert( traction ) ) {
|
||||
ErrorLog( "Bad scenario: traction piece with duplicate name \"" + traction->name() + "\" encountered in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
|
||||
}
|
||||
scene::Groups.register_node( traction, scene::Groups.handle() );
|
||||
scene::Groups.insert( scene::Groups.handle(), traction );
|
||||
simulation::Region->insert_and_register( traction );
|
||||
}
|
||||
else if( nodedata.type == "tractionpowersource" ) {
|
||||
@@ -378,7 +378,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
if( false == simulation::Instances.insert( instance ) ) {
|
||||
ErrorLog( "Bad scenario: 3d model instance with duplicate name \"" + instance->name() + "\" encountered in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
|
||||
}
|
||||
scene::Groups.register_node( instance, scene::Groups.handle() );
|
||||
scene::Groups.insert( scene::Groups.handle(), instance );
|
||||
simulation::Region->insert( instance );
|
||||
}
|
||||
}
|
||||
@@ -421,7 +421,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
if( false == simulation::Memory.insert( memorycell ) ) {
|
||||
ErrorLog( "Bad scenario: memory memorycell with duplicate name \"" + memorycell->name() + "\" encountered in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
|
||||
}
|
||||
scene::Groups.register_node( memorycell, scene::Groups.handle() );
|
||||
scene::Groups.insert( scene::Groups.handle(), memorycell );
|
||||
simulation::Region->insert( memorycell );
|
||||
}
|
||||
else if( nodedata.type == "eventlauncher" ) {
|
||||
@@ -436,7 +436,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
simulation::Events.queue( eventlauncher );
|
||||
}
|
||||
else {
|
||||
scene::Groups.register_node( eventlauncher, scene::Groups.handle() );
|
||||
scene::Groups.insert( scene::Groups.handle(), eventlauncher );
|
||||
simulation::Region->insert( eventlauncher );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user