cooling fans state indicator, minor diesel engine logic tweaks

This commit is contained in:
tmj-fstate
2019-03-17 19:08:53 +01:00
parent 8d67338950
commit 04db86baa6
5 changed files with 25 additions and 9 deletions

View File

@@ -4108,9 +4108,14 @@ TController::UpdateSituation(double dt) {
// TODO: check if this situation still happens and the hack is still needed
if( ( false == AIControllFlag )
&& ( iDrivigFlags & moveDoorOpened )
&& ( mvOccupied->Doors.close_control != control_t::driver )
&& ( mvControlling->MainCtrlPos > ( mvControlling->EngineType != TEngineType::DieselEngine ? 0 : 1 ) ) ) { // for diesel 1st position is effectively 0
Doors( false );
&& ( mvOccupied->Doors.close_control != control_t::driver ) ) {
// for diesel engines react when engine is put past idle revolutions
// for others straightforward master controller check
if( ( mvControlling->EngineType == TEngineType::DieselEngine ?
mvControlling->RList[ mvControlling->MainCtrlPos ].Mn > 0 :
mvControlling->MainCtrlPos > 0 ) ) {
Doors( false );
}
}
// basic situational ai operations