mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 19:52:47 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
@@ -37,6 +37,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "utilities/utilities.h"
|
||||
#include "editor/editorTerrainStreamer.hpp"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace simulation {
|
||||
|
||||
@@ -569,7 +570,14 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
|
||||
}
|
||||
else if( nodedata.type == "track" ) {
|
||||
|
||||
auto *path { deserialize_path( Input, Scratchpad, nodedata ) };
|
||||
std::unique_ptr<TTrack> made { deserialize_path( Input, Scratchpad, nodedata ) };
|
||||
if( made->eType == tt_Unknown ) {
|
||||
// with no path made it can't be joined nor drawn, and nothing could run on it: it goes with its holder
|
||||
ErrorLog( std::format( "Bad scenario: track \"{}\" of an unknown type defined in file \"{}\" (line {}) left out", made->name(), Input.Name(), inputline ) );
|
||||
return;
|
||||
}
|
||||
// from here on the scene owns it
|
||||
auto *path { made.release() };
|
||||
// duplicates of named tracks are currently experimentally allowed
|
||||
if( false == simulation::Paths.insert( path ) ) {
|
||||
ErrorLog( "Bad scenario: duplicate track name \"" + path->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
|
||||
|
||||
Reference in New Issue
Block a user