18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 00:22:42 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
jerrrrycho e6d576fd82 fix(derailment): a coupling between a vehicle off the track and one on it pulls taut, holds or breaks
With either vehicle of a pair off the track (physics.derailment new) the distance between their ends is
measured where they are, but the physical coupler model still took its change from the moves of the
vehicles along the track. Once the ends had gone past each other (the locomotive lying beside the track,
the coach coupled to it running on along the rails) a run that opened the gap counted as closing it: the
draw gear unloaded, the coupling carried 0 N while the gap grew to tens of metres, the stop of the draw
gear was never hit and the coupling never broke. The tension, had there been any, pushed the coach on.

update_neighbours() now gives the pair the shares the move of each vehicle along its axis has in the gap,
in the direction the ends are apart in (TMoverParameters::coupler_gap_change()); the gap, its rate and the
hit on the stop go by them, and of the coupler force each vehicle takes along its axis the share the gap
goes by. On the track nothing changes.

The coupling of a vehicle off the track pulls the one coupled to it off the rails once the climbing limit
holds over 2 m. That distance was the run of the vehicle off the track, so one lying at rest never pulled
off the vehicle running past it; it is the run of the wheels of the vehicle pulled now.
2026-11-29 02:39:09 +01:00
Hirek 226155d430 feat(physics): physical coupler model for the player's train and those it closes in on, plastic hit on solid buffers 2026-11-11 03:15:58 +01:00
Hirek aba8687678 feat(ui): repair the broken coupler next to the camera from the driving aid 2026-11-11 02:52:00 +01:00
Hirek c85aab4f3f feat(physics): physical coupler model with slack, hysteresis and breaking 2026-11-11 01:43:46 +01:00