mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 14:59:43 +01:00
fix(editor): the uneven attribute is written in the layout of the entry it goes into
Its numbers go by position, and the positions differ between a plain track and a switch. A switch made in the style of a plain track wrote them in the layout of the plain one, so they were read back as other values: the up and down part as the value of the path p3-p4, and so on. The values are now one struct with pure functions to read, write and resolve them, which replaces eight fields and which the unit tests can reach.
This commit is contained in:
@@ -17,6 +17,7 @@ http:
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "world/Segment.h"
|
||||
#include "world/TrackUneven.h"
|
||||
#include "utilities/Classes.h"
|
||||
|
||||
class TTrack;
|
||||
@@ -55,14 +56,7 @@ class editor_track
|
||||
float texslope{0.9f};
|
||||
std::vector<std::string> isolated;
|
||||
float overhead{-1.f};
|
||||
float uneven{0.f};
|
||||
float unevenup{-1.f};
|
||||
float unevenside{-1.f};
|
||||
float unevencross{-1.f};
|
||||
float unevenbranch{-1.f};
|
||||
float unevenbranchup{-1.f};
|
||||
float unevenbranchside{-1.f};
|
||||
float jointdip{-1.f};
|
||||
track_uneven::attribute uneven;
|
||||
bool sleepers{false};
|
||||
float sleeper_frequency{0.6f};
|
||||
std::string sleeper_model;
|
||||
|
||||
Reference in New Issue
Block a user