mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-04 01:52:05 +01:00
fix: coupler force of vehicles facing each other taken back along the other vehicle's axis
CForce runs along the axis of its own vehicle, so the force the other vehicle takes back on its coupler of the pair is turned around once more when the vehicles face each other (-CF * DirPatch()), as that vehicle computes it itself. Tests: the coupler forces of the pair facing each other and facing the same way.
This commit is contained in:
@@ -5463,8 +5463,9 @@ double TMoverParameters::CouplerForce(int const End, double dt)
|
||||
|
||||
if (thiscoupler.CouplingFlag != coupling::faux)
|
||||
{
|
||||
// uzgadnianie prawa Newtona, on the coupler of the other vehicle this one is coupled with
|
||||
othervehicle->Couplers[otherend].CForce = -CF;
|
||||
// uzgadnianie prawa Newtona, on the coupler of the other vehicle this one is coupled with, along that vehicle's
|
||||
// axis: turned around once more when the vehicles face each other
|
||||
othervehicle->Couplers[otherend].CForce = -CF * DirPatch(End, otherend);
|
||||
}
|
||||
|
||||
return CF;
|
||||
|
||||
Reference in New Issue
Block a user