mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
build 181005. automatic switch trackbed generation
This commit is contained in:
@@ -433,7 +433,16 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
|| ( nodedata.type == "triangle_strip" )
|
||||
|| ( nodedata.type == "triangle_fan" ) ) {
|
||||
|
||||
if( false == Scratchpad.binary.terrain ) {
|
||||
auto const skip {
|
||||
// all shapes will be loaded from the binary version of the file
|
||||
( true == Scratchpad.binary.terrain )
|
||||
// crude way to detect fixed switch trackbed geometry
|
||||
|| ( ( true == Global.CreateSwitchTrackbeds )
|
||||
&& ( Input.Name().size() >= 15 )
|
||||
&& ( Input.Name().substr( 0, 11 ) == "scenery/zwr" )
|
||||
&& ( Input.Name().substr( Input.Name().size() - 4 ) == ".inc" ) ) };
|
||||
|
||||
if( false == skip ) {
|
||||
|
||||
simulation::Region->insert(
|
||||
scene::shape_node().import(
|
||||
@@ -442,7 +451,6 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
true );
|
||||
}
|
||||
else {
|
||||
// all shapes were already loaded from the binary version of the file
|
||||
skip_until( Input, "endtri" );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user