16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 07:49:19 +02:00

distance counter cab control, load exchange fix

This commit is contained in:
tmj-fstate
2019-09-19 20:13:36 +02:00
parent b2b49f933c
commit 4e0975f387
12 changed files with 132 additions and 30 deletions

View File

@@ -3132,8 +3132,16 @@ bool TDynamicObject::Update(double dt, double dt1)
modelRot.z };
// McZapkie-260202 - dMoveLen przyda sie przy stukocie kol
dDOMoveLen = GetdMoveLen() + MoverParameters->ComputeMovement(dt, dt1, ts, tp, tmpTraction, l, r);
if( Mechanik )
Mechanik->MoveDistanceAdd( dDOMoveLen ); // dodanie aktualnego przemieszczenia
if( Mechanik ) {
// dodanie aktualnego przemieszczenia
Mechanik->MoveDistanceAdd( dDOMoveLen );
}
if( ( simulation::Train != nullptr )
&& ( simulation::Train->Dynamic() == this ) ) {
// update distance meter in user-controlled cab
// TBD: place the meter on mover logic level?
simulation::Train->add_distance( dDOMoveLen );
}
Move(dDOMoveLen);
if (!bEnabled) // usuwane pojazdy nie mają toru
{ // pojazd do usunięcia