mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 02:09:19 +02:00
build 200108. sound start offset support, default coupler sound naming cleanup, minor bug fixes
This commit is contained in:
@@ -743,12 +743,20 @@ driver_mode::OnKeyDown(int cKey) {
|
||||
// jeśli mielismy pojazd
|
||||
if( simulation::Train->Dynamic()->Mechanik ) { // na skutek jakiegoś błędu może czasem zniknąć
|
||||
auto const *currentvehicle { simulation::Train->Dynamic() };
|
||||
auto const samevehicle { currentvehicle == targetvehicle };
|
||||
|
||||
if( samevehicle ) {
|
||||
// we already control desired vehicle so don't overcomplicate things
|
||||
InOutKey(); // do kabiny
|
||||
break;
|
||||
}
|
||||
|
||||
auto const sameconsist {
|
||||
( targetvehicle->ctOwner == currentvehicle->Mechanik )
|
||||
|| ( targetvehicle->ctOwner == currentvehicle->ctOwner ) };
|
||||
auto const isincharge { currentvehicle->Mechanik->primary() };
|
||||
auto const aidriveractive { currentvehicle->Mechanik->AIControllFlag };
|
||||
|
||||
|
||||
if( !sameconsist && isincharge ) {
|
||||
// oddajemy dotychczasowy AI
|
||||
simulation::Train->Dynamic()->Mechanik->TakeControl( true );
|
||||
|
||||
Reference in New Issue
Block a user