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

ground relay start method, motor connector logic fixes, ai door control logic fix, user vehicle initialization fix

This commit is contained in:
tmj-fstate
2020-04-09 01:32:11 +02:00
parent 0593f158ba
commit 65780f9fb2
4 changed files with 48 additions and 17 deletions

View File

@@ -219,6 +219,9 @@ void state_manager::process_commands() {
if (commanddata.command == user_command::entervehicle) {
// przesiadka do innego pojazdu
if( commanddata.payload == "ghostview" ) {
continue;
}
// NOTE: because malformed scenario can have vehicle name duplicates we first try to locate vehicle in world, with name search as fallback
TDynamicObject *targetvehicle = std::get<TDynamicObject *>( simulation::Region->find_vehicle( commanddata.location, 50, false, false ) );
if( ( targetvehicle == nullptr ) || ( targetvehicle->name() != commanddata.payload ) ) {