17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 12:48:35 +01:00

feat(roads): right of way and lane turns at junctions, road weights, kerbs, medians and forking roads, banks to the ground, roundabouts, pedestrian crossings, spawn sets by count; fix(editor): model skin export, placement on the ground under the orthophoto

This commit is contained in:
2026-10-04 01:55:35 +02:00
parent 3ce9102da0
commit 27a94509c4
17 changed files with 2198 additions and 244 deletions

View File

@@ -12,6 +12,7 @@ http://mozilla.org/MPL/2.0/.
#include <string>
#include <vector>
#include <deque>
#include <array>
#include <glm/glm.hpp>
#include <glm/mat4x4.hpp>
@@ -187,6 +188,7 @@ public:
std::vector<segment_data> m_paths; // source data for owned paths
bool m_editorremoved { false };
scene::basic_node *m_road { nullptr }; // road or road junction which generated this path. such path is one-way, and isn't saved nor edited on its own
std::array<float, 3> m_routeweights { 0.f, 0.f, 0.f }; // odds of each route through a crossroads being picked by a driver, by the number of the route. all zero: even odds
int iterate_stamp = 0;
// sleepermodel optional parameter -------------------------------------------------
@@ -280,6 +282,8 @@ public:
int
RouteCount() const {
return SwitchExtension != nullptr ? SwitchExtension->iRoads - 1 : 1; }
// picks one of the routes through a crossroads for a driver heading for it. the routes are numbered from 1
int RouteDraw() const;
void Load(cParser *parser, glm::dvec3 const &pOrigin);
void init_segments( bool const Initial );
void update_location();