18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-28 22:03:20 +01:00
Files
maszyna/tests/unit/test_collisions.cpp
jerrrrycho d9c72e3d7c fix(physics): a repaired vehicle has its crushed ends rebuilt and its collision derailment cleared
Neither resetconsist nor the repair of a coupler cleared what a collision left: the crush of the ends (which keeps
shifting the stop of the buffers in CouplerForce() and in the pair input of the coupler physics, so the next hit of
the repaired consist started past it and sooner over the override threshold), the energy of the contact, the hit of
the step and the reports of the log; nor the reason of a derailment in a collision and the state of the push off.

repair_damage() rebuilds both ends of the vehicle, rerail() clears CollisionDerail and the push off monitor along with
the state of the criteria of derailment (so SetDamage taking dtrain_out off does as well), and the repair of a coupler
rebuilds its end, the crush past the draw gear having torn it off.
2026-11-16 07:56:12 +01:00

57 KiB