mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 14:20:21 +01:00
refactor(track): what goes with unevenness in one place, readable
The rules stay in TrackUneven.h with no dependence on the engine, as they can be tested. Their use on the tracks moves out of Track.cpp to TrackUneven.cpp, split into steps: the group of switches, the values of its paths, the meeting of two ends. One set of helpers for the paths of a track takes the place of the same conditions written out in several places, and the value at the ends of a switch is worked out in one place. The clatter of an axle leaves the long Update of a vehicle. The fields in the editor say themselves when they show. No change in behaviour.
This commit is contained in:
@@ -404,6 +404,8 @@ private:
|
||||
sound_source clatter; // clatter emitter
|
||||
bool atjoints { false }; // distance comes from TTrack::rail_phase
|
||||
};
|
||||
// whether the axle has just passed a rail joint. On a track with dipping joints it goes by them, elsewhere the axle counts a rail off itself
|
||||
bool axle_passed_joint( axle_sounds &Axle, double const Move, int const Direction );
|
||||
|
||||
struct powertrain_sounds {
|
||||
sound_source inverter { sound_placement::engine };
|
||||
|
||||
Reference in New Issue
Block a user