mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 17:26:22 +01:00
Merge remote-tracking branch 'jano211/siec-radio' into feat/renderers-cleanup
This commit is contained in:
@@ -27,6 +27,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "model/AnimModel.h"
|
||||
#include "rendering/lightarray.h"
|
||||
#include "world/TractionPower.h"
|
||||
#include "world/catenary_scene.h"
|
||||
#include "world/Road.h"
|
||||
#include "world/Sweep.h"
|
||||
#include "world/RoadPoint.h"
|
||||
@@ -59,6 +60,9 @@ state_serializer::deserialize_begin( std::string const &Scenariofile ) {
|
||||
EditorTerrain.reset();
|
||||
scene::terrain_file::references().clear();
|
||||
|
||||
// podwieszenia sieci trakcyjnej poprzedniej scenerii
|
||||
catenary_scene_clear();
|
||||
|
||||
// TODO: move initialization to separate routine so we can reuse it
|
||||
SafeDelete( Region );
|
||||
Region = new scene::basic_region();
|
||||
@@ -169,6 +173,10 @@ state_serializer::deserialize_continue(std::shared_ptr<deserializer_state> state
|
||||
if( lookup != state->functionmap.end() ) {
|
||||
lookup->second();
|
||||
}
|
||||
else if( token == "catenary" ) {
|
||||
// sieć trakcyjna: plik z podwieszeniami, "catenary <plik> endcatenary"
|
||||
catenary_scene_load( Input );
|
||||
}
|
||||
else {
|
||||
ErrorLog( "Bad scenario: unexpected token \"" + token + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( Input.Line() - 1 ) + ")" );
|
||||
}
|
||||
@@ -450,6 +458,7 @@ state_serializer::deserialize_firstinit( cParser &Input, scene::scratch_data &Sc
|
||||
// crossings and traffic points go by the lanes, which are complete at this point
|
||||
simulation::Roadpoints.InitRoadpoints();
|
||||
simulation::Traction.InitTraction();
|
||||
catenary_scene_resolve();
|
||||
simulation::Events.InitEvents();
|
||||
simulation::Events.InitLaunchers();
|
||||
simulation::Memory.InitCells();
|
||||
|
||||
Reference in New Issue
Block a user