mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-23 02:49:19 +02:00
cooling fans state indicator, minor diesel engine logic tweaks
This commit is contained in:
11
Driver.cpp
11
Driver.cpp
@@ -4108,9 +4108,14 @@ TController::UpdateSituation(double dt) {
|
|||||||
// TODO: check if this situation still happens and the hack is still needed
|
// TODO: check if this situation still happens and the hack is still needed
|
||||||
if( ( false == AIControllFlag )
|
if( ( false == AIControllFlag )
|
||||||
&& ( iDrivigFlags & moveDoorOpened )
|
&& ( iDrivigFlags & moveDoorOpened )
|
||||||
&& ( mvOccupied->Doors.close_control != control_t::driver )
|
&& ( mvOccupied->Doors.close_control != control_t::driver ) ) {
|
||||||
&& ( mvControlling->MainCtrlPos > ( mvControlling->EngineType != TEngineType::DieselEngine ? 0 : 1 ) ) ) { // for diesel 1st position is effectively 0
|
// for diesel engines react when engine is put past idle revolutions
|
||||||
Doors( false );
|
// 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
|
// basic situational ai operations
|
||||||
|
|||||||
@@ -4066,7 +4066,7 @@ void TDynamicObject::RenderSounds() {
|
|||||||
else {
|
else {
|
||||||
// basic clash
|
// basic clash
|
||||||
couplersounds.dsbBufferClamp
|
couplersounds.dsbBufferClamp
|
||||||
.gain( 0.65f )
|
.gain( 1.f )
|
||||||
.play( sound_flags::exclusive );
|
.play( sound_flags::exclusive );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4091,7 +4091,7 @@ void TDynamicObject::RenderSounds() {
|
|||||||
else {
|
else {
|
||||||
// basic clash
|
// basic clash
|
||||||
couplersounds.dsbCouplerStretch
|
couplersounds.dsbCouplerStretch
|
||||||
.gain( 0.65f )
|
.gain( 1.f )
|
||||||
.play( sound_flags::exclusive );
|
.play( sound_flags::exclusive );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6135,12 +6135,13 @@ bool TMoverParameters::dizel_StartupCheck() {
|
|||||||
|
|
||||||
// test the fuel pump
|
// test the fuel pump
|
||||||
// TODO: add fuel pressure check
|
// TODO: add fuel pressure check
|
||||||
if( false == FuelPump.is_active ) {
|
if( ( RList[ MainCtrlPos ].R == 0.0 )
|
||||||
|
|| ( false == FuelPump.is_active ) ) {
|
||||||
engineisready = false;
|
engineisready = false;
|
||||||
if( FuelPump.start_type == start_t::manual ) {
|
// if( FuelPump.start_type == start_t::manual ) {
|
||||||
// with manual pump control startup procedure is done only once per starter switch press
|
// with manual pump control startup procedure is done only once per starter switch press
|
||||||
dizel_startup = false;
|
dizel_startup = false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
// test the oil pump
|
// test the oil pump
|
||||||
if( ( false == OilPump.is_active )
|
if( ( false == OilPump.is_active )
|
||||||
|
|||||||
11
Train.cpp
11
Train.cpp
@@ -5507,7 +5507,12 @@ bool TTrain::Update( double const Deltatime )
|
|||||||
}
|
}
|
||||||
if (ggIgnitionKey.SubModel)
|
if (ggIgnitionKey.SubModel)
|
||||||
{
|
{
|
||||||
ggIgnitionKey.UpdateValue(mvControlled->dizel_startup);
|
ggIgnitionKey.UpdateValue(
|
||||||
|
( mvControlled->Mains )
|
||||||
|
|| ( mvControlled->dizel_startup )
|
||||||
|
|| ( fMainRelayTimer > 0.f )
|
||||||
|
|| ( ggMainButton.GetDesiredValue() > 0.95 )
|
||||||
|
|| ( ggMainOnButton.GetDesiredValue() > 0.95 ) );
|
||||||
ggIgnitionKey.Update();
|
ggIgnitionKey.Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5718,6 +5723,7 @@ bool TTrain::Update( double const Deltatime )
|
|||||||
// others
|
// others
|
||||||
btLampkaMalfunction.Turn( mvControlled->dizel_heat.PA );
|
btLampkaMalfunction.Turn( mvControlled->dizel_heat.PA );
|
||||||
btLampkaMotorBlowers.Turn( ( mvControlled->MotorBlowers[ end::front ].is_active ) && ( mvControlled->MotorBlowers[ end::rear ].is_active ) );
|
btLampkaMotorBlowers.Turn( ( mvControlled->MotorBlowers[ end::front ].is_active ) && ( mvControlled->MotorBlowers[ end::rear ].is_active ) );
|
||||||
|
btLampkaCoolingFans.Turn( mvControlled->RventRot > 1.0 );
|
||||||
// universal devices state indicators
|
// universal devices state indicators
|
||||||
for( auto idx = 0; idx < btUniversals.size(); ++idx ) {
|
for( auto idx = 0; idx < btUniversals.size(); ++idx ) {
|
||||||
btUniversals[ idx ].Turn( ggUniversals[ idx ].GetValue() > 0.5 );
|
btUniversals[ idx ].Turn( ggUniversals[ idx ].GetValue() > 0.5 );
|
||||||
@@ -5778,6 +5784,7 @@ bool TTrain::Update( double const Deltatime )
|
|||||||
// others
|
// others
|
||||||
btLampkaMalfunction.Turn( false );
|
btLampkaMalfunction.Turn( false );
|
||||||
btLampkaMotorBlowers.Turn( false );
|
btLampkaMotorBlowers.Turn( false );
|
||||||
|
btLampkaCoolingFans.Turn( false );
|
||||||
// universal devices state indicators
|
// universal devices state indicators
|
||||||
for( auto &universal : btUniversals ) {
|
for( auto &universal : btUniversals ) {
|
||||||
universal.Turn( false );
|
universal.Turn( false );
|
||||||
@@ -7415,6 +7422,7 @@ void TTrain::clear_cab_controls()
|
|||||||
btLampkaMalfunction.Clear();
|
btLampkaMalfunction.Clear();
|
||||||
btLampkaMalfunctionB.Clear();
|
btLampkaMalfunctionB.Clear();
|
||||||
btLampkaMotorBlowers.Clear();
|
btLampkaMotorBlowers.Clear();
|
||||||
|
btLampkaCoolingFans.Clear();
|
||||||
|
|
||||||
ggLeftLightButton.Clear();
|
ggLeftLightButton.Clear();
|
||||||
ggRightLightButton.Clear();
|
ggRightLightButton.Clear();
|
||||||
@@ -7759,6 +7767,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
|
|||||||
{ "i-highcurrent:", btLampkaWysRozr },
|
{ "i-highcurrent:", btLampkaWysRozr },
|
||||||
{ "i-vent_trim:", btLampkaWentZaluzje },
|
{ "i-vent_trim:", btLampkaWentZaluzje },
|
||||||
{ "i-motorblowers:", btLampkaMotorBlowers },
|
{ "i-motorblowers:", btLampkaMotorBlowers },
|
||||||
|
{ "i-coolingfans:", btLampkaCoolingFans },
|
||||||
{ "i-trainheating:", btLampkaOgrzewanieSkladu },
|
{ "i-trainheating:", btLampkaOgrzewanieSkladu },
|
||||||
{ "i-security_aware:", btLampkaCzuwaka },
|
{ "i-security_aware:", btLampkaCzuwaka },
|
||||||
{ "i-security_cabsignal:", btLampkaSHP },
|
{ "i-security_cabsignal:", btLampkaSHP },
|
||||||
|
|||||||
1
Train.h
1
Train.h
@@ -582,6 +582,7 @@ public: // reszta może by?publiczna
|
|||||||
TButton btLampkaMalfunction;
|
TButton btLampkaMalfunction;
|
||||||
TButton btLampkaMalfunctionB;
|
TButton btLampkaMalfunctionB;
|
||||||
TButton btLampkaMotorBlowers;
|
TButton btLampkaMotorBlowers;
|
||||||
|
TButton btLampkaCoolingFans;
|
||||||
|
|
||||||
TButton btCabLight; // hunter-171012: lampa oswietlajaca kabine
|
TButton btCabLight; // hunter-171012: lampa oswietlajaca kabine
|
||||||
// Ra 2013-12: wirtualne "lampki" do odbijania na haslerze w PoKeys
|
// Ra 2013-12: wirtualne "lampki" do odbijania na haslerze w PoKeys
|
||||||
|
|||||||
Reference in New Issue
Block a user