17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02: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

@@ -17,6 +17,7 @@ http://mozilla.org/MPL/2.0/.
#include "world/MemCell.h"
#include "world/Track.h"
#include "world/Road.h"
#include "world/Sweep.h"
#include "world/RoadPoint.h"
#include "world/Traction.h"
#include "world/TractionPower.h"
@@ -39,6 +40,7 @@ event_manager Events;
memory_table Memory;
path_table Paths;
road_table Roads;
sweep_table Sweeps;
junction_table Junctions;
roadpoint_table Roadpoints;
traction_table Traction;
@@ -497,6 +499,10 @@ TAnimModel * state_manager::create_model(const std::string &src, const std::stri
return m_serializer.create_model(src, name, position);
}
std::vector<TDynamicObject *> state_manager::insert_trainset(std::string const &Name, TTrack *Path, double const Offset, std::string const &Vehicles, bool const Reversed) {
return m_serializer.insert_trainset(Name, Path, Offset, Vehicles, Reversed);
}
TEventLauncher * state_manager::create_eventlauncher(const std::string &src, const std::string &name, const glm::dvec3 &position) {
return m_serializer.create_eventlauncher(src, name, position);
}