18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-04 23:45:17 +01:00
Files
jerrrrycho 4d6f5d5f7a feat(physics): physics.derailment.runthrough gates the damage of a switch run through
The refused throws of a switch run through and the split of a vehicle running onto it from its points hung only
on physics.derailment new. Existing sceneries trail through switches set against the train in ordinary play (four
td.scn cases do), so with new as the default (#631) such a switch would refuse the signaller for the rest of the
run and split the next train routed over it, with no way back but monitor, which turns off everything else of new.

The damage now has its own eu07.ini key, physics.derailment.runthrough yes|no, default no. With no a run-through is
still detected, logged, kept by the switch and its snapshot and given to the scenery, and new still derails a
run-through over 60 km/h, but the switch obeys the throws and is run over from its points as before. monitor tells
what new would do with the same key. The rules come from switch_fork::configured_rules() (world/switchfork.h),
which replaces the free run_through_rules() of world/Track.h.

monitor told "ran onto switch ... from its points" for every vehicle of every later train; it is told once for a
switch now (TSwitchExtension::m_splittold, kept in snapshots as runthroughsplittold).

The scenario cases of the damage set the key; eu07_td_switch_run_through_backs_new checks new with the default.
Documented in docs/behaviour-changes.md, tests/scenarios/README.md and blackbox_doc.md.
2026-12-04 21:46:35 +01:00
..
2026-11-29 16:55:25 +01:00