mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 05:00:29 +01:00
fix(vehicles): vehicle placed with a switch as its first path no longer reads the direction of a previous path it doesn't have; vehicle put back on the track keeps the direction of its axles
This commit is contained in:
@@ -1917,11 +1917,11 @@ void TDynamicObject::place_on_track(TTrack *Track, double fDist, bool Reversed)
|
||||
switch (iNumAxles) {
|
||||
// Ra: pojazdy wstawiane są na tor początkowy, a potem przesuwane
|
||||
case 2: // ustawianie osi na torze
|
||||
Axle0.Init(Track, this, iDirection ? 1 : -1);
|
||||
Axle0.Reset();
|
||||
Axle0.Init(Track, this, iDirection ? 1 : -1);
|
||||
Axle0.Move((iDirection ? fDist : -fDist) + fAxleDistHalf, false);
|
||||
Axle1.Init(Track, this, iDirection ? 1 : -1);
|
||||
Axle1.Reset();
|
||||
Axle1.Init(Track, this, iDirection ? 1 : -1);
|
||||
Axle1.Move((iDirection ? fDist : -fDist) - fAxleDistHalf, false); // false, żeby nie generować eventów
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user