17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 09:59:06 +01:00

feat(scenery): models laid along curves (sweep nodes), bent to follow the paths or repeated along them, loaded and saved with the scenery; trainsets put on a path while the simulation runs; trainset turned around by reversed after its header: the first vehicle stays at the offset and leads towards point 1, the rest stands behind it; launcher keeps reversed trainsets and can turn one around; memory cells saved with the new name of the path they name; events tell their targets and the events of a multiple event; renderer tells whether the cursor is over a surface; vehicle placed in the editor entered when the driving goes on

This commit is contained in:
maj00r
2026-10-06 22:19:32 +02:00
parent 084a705452
commit 978b99b7e5
21 changed files with 1329 additions and 15 deletions

View File

@@ -44,6 +44,8 @@ public:
export_as_text( std::string const &Scenariofile ) const;
// create new model from node stirng
TAnimModel * create_model(std::string const &src, std::string const &name, const glm::dvec3 &position);
// places the vehicles, given as their node statements, as a trainset on the path, while the simulation runs. returns: the vehicles made
std::vector<TDynamicObject *> insert_trainset(std::string const &Name, TTrack *Path, double const Offset, std::string const &Vehicles, bool const Reversed = false);
// create new eventlauncher from node stirng
TEventLauncher * create_eventlauncher(std::string const &src, std::string const &name, const glm::dvec3 &position);
// creates model instances defined by an include directive placed or changed in the scenery editor, to show the outcome.
@@ -80,6 +82,7 @@ private:
void deserialize_terrain( cParser &Input, scene::scratch_data &Scratchpad );
void deserialize_editorterrain( cParser &Input, scene::scratch_data &Scratchpad );
void deserialize_endtrainset( cParser &Input, scene::scratch_data &Scratchpad );
void deserialize_reversed( cParser &Input, scene::scratch_data &Scratchpad );
TTrack * deserialize_path( cParser &Input, scene::scratch_data &Scratchpad, scene::node_data const &Nodedata );
TTraction * deserialize_traction( cParser &Input, scene::scratch_data &Scratchpad, scene::node_data const &Nodedata );
TTractionPowerSource * deserialize_tractionpowersource( cParser &Input, scene::scratch_data &Scratchpad, scene::node_data const &Nodedata );