mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 11:39:19 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
17
Driver.cpp
17
Driver.cpp
@@ -2340,16 +2340,19 @@ bool TController::PrepareEngine()
|
|||||||
else
|
else
|
||||||
OK = false;
|
OK = false;
|
||||||
|
|
||||||
OK = OK && ( mvOccupied->ActiveDir != 0 ) && ( mvControlling->ScndPipePress > 4.5 ) && ( workingtemperature );
|
if( ( true == OK )
|
||||||
if (OK)
|
&& ( mvOccupied->ActiveDir != 0 )
|
||||||
{
|
&& ( true == workingtemperature )
|
||||||
if (eStopReason == stopSleep) // jeśli dotychczas spał
|
&& ( ( mvControlling->ScndPipePress > 4.5 ) || ( mvControlling->VeselVolume == 0.0 ) ) ) {
|
||||||
eStopReason = stopNone; // teraz nie ma powodu do stania
|
|
||||||
|
if( eStopReason == stopSleep ) {
|
||||||
|
// jeśli dotychczas spał teraz nie ma powodu do stania
|
||||||
|
eStopReason = stopNone;
|
||||||
|
}
|
||||||
iEngineActive = 1;
|
iEngineActive = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
iEngineActive = 0;
|
iEngineActive = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
134
DynObj.cpp
134
DynObj.cpp
@@ -586,18 +586,15 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
if (vFloor.z > 0.0)
|
if (vFloor.z > 0.0)
|
||||||
mdLoad->GetSMRoot()->SetTranslate(modelShake + vFloor);
|
mdLoad->GetSMRoot()->SetTranslate(modelShake + vFloor);
|
||||||
|
|
||||||
if (ObjSqrDist < 160000) // gdy bliżej niż 400m
|
if (ObjSqrDist < ( 400 * 400 ) ) // gdy bliżej niż 400m
|
||||||
{
|
{
|
||||||
for (int i = 0; i < iAnimations; ++i) // wykonanie kolejnych animacji
|
for (int i = 0; i < iAnimations; ++i) // wykonanie kolejnych animacji
|
||||||
if (ObjSqrDist < pAnimations[i].fMaxDist)
|
if (ObjSqrDist < pAnimations[ i ].fMaxDist)
|
||||||
if (pAnimations[i].yUpdate) // jeśli zdefiniowana funkcja
|
if (pAnimations[ i ].yUpdate) // jeśli zdefiniowana funkcja
|
||||||
pAnimations[ i ].yUpdate( &pAnimations[i] ); // aktualizacja animacji (położenia submodeli
|
pAnimations[ i ].yUpdate( &pAnimations[ i ] ); // aktualizacja animacji (położenia submodeli
|
||||||
/*
|
|
||||||
pAnimations[i].yUpdate(pAnimations +
|
|
||||||
i); // aktualizacja animacji (położenia submodeli
|
|
||||||
*/
|
|
||||||
if( ( mdModel != nullptr )
|
if( ( mdModel != nullptr )
|
||||||
&& ( ObjSqrDist < 2500 ) ) {
|
&& ( ObjSqrDist < ( 50 * 50 ) ) ) {
|
||||||
// gdy bliżej niż 50m
|
// gdy bliżej niż 50m
|
||||||
// ABu290105: rzucanie pudlem
|
// ABu290105: rzucanie pudlem
|
||||||
// te animacje wymagają bananów w modelach!
|
// te animacje wymagają bananów w modelach!
|
||||||
@@ -660,11 +657,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
}
|
}
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btCPneumatic1.TurnOff();
|
|
||||||
// btCPneumatic1r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_pneumatic))
|
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_pneumatic))
|
||||||
{
|
{
|
||||||
@@ -685,11 +677,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
}
|
}
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btCPneumatic2.TurnOff();
|
|
||||||
// btCPneumatic2r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
// przewody zasilajace, j.w. (yB)
|
// przewody zasilajace, j.w. (yB)
|
||||||
if (TestFlag(MoverParameters->Couplers[0].CouplingFlag, ctrain_scndpneumatic))
|
if (TestFlag(MoverParameters->Couplers[0].CouplingFlag, ctrain_scndpneumatic))
|
||||||
@@ -711,11 +698,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
}
|
}
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btPneumatic1.TurnOff();
|
|
||||||
// btPneumatic1r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_scndpneumatic))
|
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_scndpneumatic))
|
||||||
{
|
{
|
||||||
@@ -736,11 +718,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
}
|
}
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btPneumatic2.TurnOff();
|
|
||||||
// btPneumatic2r.TurnOff();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
//*********************************************************************************/
|
//*********************************************************************************/
|
||||||
else // po staremu ABu'oewmu
|
else // po staremu ABu'oewmu
|
||||||
@@ -755,11 +732,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
btCPneumatic1r.TurnOn();
|
btCPneumatic1r.TurnOn();
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btCPneumatic1.TurnOff();
|
|
||||||
// btCPneumatic1r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_pneumatic))
|
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_pneumatic))
|
||||||
{
|
{
|
||||||
@@ -769,11 +741,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
btCPneumatic2r.TurnOn();
|
btCPneumatic2r.TurnOn();
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btCPneumatic2.TurnOff();
|
|
||||||
// btCPneumatic2r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
// przewody powietrzne j.w., ABu: decyzja czy rysowac tylko na podstawie
|
// przewody powietrzne j.w., ABu: decyzja czy rysowac tylko na podstawie
|
||||||
// 'render'
|
// 'render'
|
||||||
@@ -786,11 +753,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
btPneumatic1r.TurnOn();
|
btPneumatic1r.TurnOn();
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btPneumatic1.TurnOff();
|
|
||||||
// btPneumatic1r.TurnOff();
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_scndpneumatic))
|
if (TestFlag(MoverParameters->Couplers[1].CouplingFlag, ctrain_scndpneumatic))
|
||||||
{
|
{
|
||||||
@@ -800,11 +762,6 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
btPneumatic2r.TurnOn();
|
btPneumatic2r.TurnOn();
|
||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
//{
|
|
||||||
// btPneumatic2.TurnOff();
|
|
||||||
// btPneumatic2r.TurnOff();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
//*************************************************************/// koniec
|
//*************************************************************/// koniec
|
||||||
// wezykow
|
// wezykow
|
||||||
@@ -819,7 +776,7 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
if (dist < 0)
|
if (dist < 0)
|
||||||
smBuforPrawy[i]->SetTranslate( Math3D::vector3(dist, 0, 0));
|
smBuforPrawy[i]->SetTranslate( Math3D::vector3(dist, 0, 0));
|
||||||
}
|
}
|
||||||
}
|
} // vehicle within 50m
|
||||||
|
|
||||||
// Winger 160204 - podnoszenie pantografow
|
// Winger 160204 - podnoszenie pantografow
|
||||||
|
|
||||||
@@ -920,6 +877,19 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
smWahacze[i]->SetRotate(float3(1, 0, 0),
|
smWahacze[i]->SetRotate(float3(1, 0, 0),
|
||||||
fWahaczeAmp * cos(MoverParameters->eAngle));
|
fWahaczeAmp * cos(MoverParameters->eAngle));
|
||||||
|
|
||||||
|
// cooling shutters
|
||||||
|
// NOTE: shutters display _on state when they're closed, _off otherwise
|
||||||
|
if( ( true == MoverParameters->dizel_heat.water.config.shutters )
|
||||||
|
&& ( false == MoverParameters->dizel_heat.zaluzje1 ) ) {
|
||||||
|
btShutters1.Turn( true );
|
||||||
|
btnOn = true;
|
||||||
|
}
|
||||||
|
if( ( true == MoverParameters->dizel_heat.water_aux.config.shutters )
|
||||||
|
&& ( false == MoverParameters->dizel_heat.zaluzje2 ) ) {
|
||||||
|
btShutters2.Turn( true );
|
||||||
|
btnOn = true;
|
||||||
|
}
|
||||||
|
|
||||||
if( ( Mechanik != nullptr )
|
if( ( Mechanik != nullptr )
|
||||||
&& ( Mechanik->GetAction() != actSleep ) ) {
|
&& ( Mechanik->GetAction() != actSleep ) ) {
|
||||||
// rysowanie figurki mechanika
|
// rysowanie figurki mechanika
|
||||||
@@ -929,7 +899,9 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
btnOn = true;
|
btnOn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // vehicle within 400m
|
||||||
|
|
||||||
if( MoverParameters->Battery || MoverParameters->ConverterFlag )
|
if( MoverParameters->Battery || MoverParameters->ConverterFlag )
|
||||||
{ // sygnały czoła pociagu //Ra: wyświetlamy bez
|
{ // sygnały czoła pociagu //Ra: wyświetlamy bez
|
||||||
// ograniczeń odległości, by były widoczne z
|
// ograniczeń odległości, by były widoczne z
|
||||||
@@ -994,6 +966,7 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
|
|||||||
sectionchunk = sectionchunk->NextGet();
|
sectionchunk = sectionchunk->NextGet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// ABu 29.01.05 koniec przeklejenia *************************************
|
// ABu 29.01.05 koniec przeklejenia *************************************
|
||||||
|
|
||||||
@@ -2103,6 +2076,12 @@ TDynamicObject::Init(std::string Name, // nazwa pojazdu, np. "EU07-424"
|
|||||||
iInventory[ side::rear ] |= btHeadSignals23.Active() ? light::headlight_right : 0;
|
iInventory[ side::rear ] |= btHeadSignals23.Active() ? light::headlight_right : 0;
|
||||||
btMechanik1.Init( "mechanik1", mdLowPolyInt, false);
|
btMechanik1.Init( "mechanik1", mdLowPolyInt, false);
|
||||||
btMechanik2.Init( "mechanik2", mdLowPolyInt, false);
|
btMechanik2.Init( "mechanik2", mdLowPolyInt, false);
|
||||||
|
if( MoverParameters->dizel_heat.water.config.shutters ) {
|
||||||
|
btShutters1.Init( "shutters1", mdModel, false );
|
||||||
|
}
|
||||||
|
if( MoverParameters->dizel_heat.water_aux.config.shutters ) {
|
||||||
|
btShutters1.Init( "shutters2", mdModel, false );
|
||||||
|
}
|
||||||
TurnOff(); // resetowanie zmiennych submodeli
|
TurnOff(); // resetowanie zmiennych submodeli
|
||||||
|
|
||||||
if( mdLowPolyInt != nullptr ) {
|
if( mdLowPolyInt != nullptr ) {
|
||||||
@@ -3741,6 +3720,8 @@ void TDynamicObject::TurnOff()
|
|||||||
btHeadSignals23.Turn( false );
|
btHeadSignals23.Turn( false );
|
||||||
btMechanik1.Turn( false );
|
btMechanik1.Turn( false );
|
||||||
btMechanik2.Turn( false );
|
btMechanik2.Turn( false );
|
||||||
|
btShutters1.Turn( false );
|
||||||
|
btShutters2.Turn( false );
|
||||||
};
|
};
|
||||||
|
|
||||||
// przeliczanie dźwięków, bo będzie słychać bez wyświetlania sektora z pojazdem
|
// przeliczanie dźwięków, bo będzie słychać bez wyświetlania sektora z pojazdem
|
||||||
@@ -3769,7 +3750,7 @@ void TDynamicObject::RenderSounds() {
|
|||||||
sConverter.stop();
|
sConverter.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( MoverParameters->VeselVolume > 0 ) {
|
if( MoverParameters->CompressorSpeed > 0.0 ) {
|
||||||
// McZapkie! - dzwiek compressor.wav tylko gdy dziala sprezarka
|
// McZapkie! - dzwiek compressor.wav tylko gdy dziala sprezarka
|
||||||
if( MoverParameters->CompressorFlag ) {
|
if( MoverParameters->CompressorFlag ) {
|
||||||
sCompressor.play( sound_flags::exclusive | sound_flags::looping );
|
sCompressor.play( sound_flags::exclusive | sound_flags::looping );
|
||||||
@@ -4966,6 +4947,18 @@ void TDynamicObject::LoadMMediaFile( std::string BaseDir, std::string TypeName,
|
|||||||
m_powertrainsounds.rsWentylator.m_frequencyfactor /= MoverParameters->RVentnmax;
|
m_powertrainsounds.rsWentylator.m_frequencyfactor /= MoverParameters->RVentnmax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if( token == "radiatorfan1:" ) {
|
||||||
|
// primary circuit radiator fan
|
||||||
|
m_powertrainsounds.radiator_fan.deserialize( parser, sound_type::single );
|
||||||
|
m_powertrainsounds.radiator_fan.owner( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( token == "radiatorfan2" ) {
|
||||||
|
// auxiliary circuit radiator fan
|
||||||
|
m_powertrainsounds.radiator_fan.deserialize( parser, sound_type::single );
|
||||||
|
m_powertrainsounds.radiator_fan.owner( this );
|
||||||
|
}
|
||||||
|
|
||||||
else if( token == "transmission:" ) {
|
else if( token == "transmission:" ) {
|
||||||
// plik z dzwiekiem, mnozniki i ofsety amp. i czest.
|
// plik z dzwiekiem, mnozniki i ofsety amp. i czest.
|
||||||
// NOTE, fixed default parameters, legacy system leftover
|
// NOTE, fixed default parameters, legacy system leftover
|
||||||
@@ -5962,8 +5955,9 @@ TDynamicObject::powertrain_sounds::position( glm::vec3 const Location ) {
|
|||||||
|
|
||||||
auto const nullvector { glm::vec3() };
|
auto const nullvector { glm::vec3() };
|
||||||
std::vector<sound_source *> enginesounds = {
|
std::vector<sound_source *> enginesounds = {
|
||||||
&motor_relay, &dsbWejscie_na_bezoporow, &motor_parallel, &rsWentylator,
|
&inverter,
|
||||||
&engine, &engine_ignition, &engine_revving, &engine_turbo,
|
&motor_relay, &dsbWejscie_na_bezoporow, &motor_parallel, &motor_shuntfield, &rsWentylator,
|
||||||
|
&engine, &engine_ignition, &engine_revving, &engine_turbo, &oil_pump, &radiator_fan, &radiator_fan_aux,
|
||||||
&transmission, &rsEngageSlippery
|
&transmission, &rsEngageSlippery
|
||||||
};
|
};
|
||||||
for( auto sound : enginesounds ) {
|
for( auto sound : enginesounds ) {
|
||||||
@@ -6189,7 +6183,6 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
|
|||||||
// motor sounds
|
// motor sounds
|
||||||
volume = 0.0;
|
volume = 0.0;
|
||||||
if( ( true == Vehicle.Mains )
|
if( ( true == Vehicle.Mains )
|
||||||
&& ( false == Vehicle.dizel_ignition )
|
|
||||||
&& ( false == motors.empty() ) ) {
|
&& ( false == motors.empty() ) ) {
|
||||||
|
|
||||||
if( std::fabs( Vehicle.enrot ) > 0.01 ) {
|
if( std::fabs( Vehicle.enrot ) > 0.01 ) {
|
||||||
@@ -6283,7 +6276,7 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
|
|||||||
if( Vehicle.EngineType == ElectricInductionMotor ) {
|
if( Vehicle.EngineType == ElectricInductionMotor ) {
|
||||||
if( Vehicle.InverterFrequency > 0.1 ) {
|
if( Vehicle.InverterFrequency > 0.1 ) {
|
||||||
|
|
||||||
volume = inverter.m_amplitudeoffset + inverter.m_amplitudefactor * std::sqrt( std::fabs( Vehicle.dizel_fill ) );
|
volume = inverter.m_amplitudeoffset + inverter.m_amplitudefactor * std::sqrt( std::abs( Vehicle.dizel_fill ) );
|
||||||
|
|
||||||
inverter
|
inverter
|
||||||
.pitch( inverter.m_frequencyoffset + inverter.m_frequencyfactor * Vehicle.InverterFrequency )
|
.pitch( inverter.m_frequencyoffset + inverter.m_frequencyfactor * Vehicle.InverterFrequency )
|
||||||
@@ -6306,6 +6299,35 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
|
|||||||
// ...otherwise shut down the sound
|
// ...otherwise shut down the sound
|
||||||
rsWentylator.stop();
|
rsWentylator.stop();
|
||||||
}
|
}
|
||||||
|
// radiator fan sounds
|
||||||
|
if( ( Vehicle.EngineType == DieselEngine )
|
||||||
|
|| ( Vehicle.EngineType == DieselElectric ) ) {
|
||||||
|
|
||||||
|
if( Vehicle.dizel_heat.rpmw > 0.1 ) {
|
||||||
|
// NOTE: fan speed tends to max out at ~100 rpm; by default we try to get pitch range of 0.5-1.5 and volume range of 0.5-1.0
|
||||||
|
radiator_fan
|
||||||
|
.pitch( 0.5 + radiator_fan.m_frequencyoffset + radiator_fan.m_frequencyfactor * Vehicle.dizel_heat.rpmw * 0.01 )
|
||||||
|
.gain( 0.5 + radiator_fan.m_amplitudeoffset + 0.5 * radiator_fan.m_amplitudefactor * Vehicle.dizel_heat.rpmw * 0.01 )
|
||||||
|
.play( sound_flags::exclusive | sound_flags::looping );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// ...otherwise shut down the sound
|
||||||
|
radiator_fan.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Vehicle.dizel_heat.rpmw2 > 0.1 ) {
|
||||||
|
// NOTE: fan speed tends to max out at ~100 rpm; by default we try to get pitch range of 0.5-1.5 and volume range of 0.5-1.0
|
||||||
|
radiator_fan_aux
|
||||||
|
.pitch( 0.5 + radiator_fan_aux.m_frequencyoffset + radiator_fan_aux.m_frequencyfactor * Vehicle.dizel_heat.rpmw2 * 0.01 )
|
||||||
|
.gain( 0.5 + radiator_fan_aux.m_amplitudeoffset + 0.5 * radiator_fan_aux.m_amplitudefactor * Vehicle.dizel_heat.rpmw2 * 0.01 )
|
||||||
|
.play( sound_flags::exclusive | sound_flags::looping );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// ...otherwise shut down the sound
|
||||||
|
radiator_fan_aux.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// relay sounds
|
// relay sounds
|
||||||
auto const soundflags { Vehicle.SoundFlag };
|
auto const soundflags { Vehicle.SoundFlag };
|
||||||
if( TestFlag( soundflags, sound::relay ) ) {
|
if( TestFlag( soundflags, sound::relay ) ) {
|
||||||
|
|||||||
4
DynObj.h
4
DynObj.h
@@ -323,6 +323,8 @@ private:
|
|||||||
sound_source engine_turbo { sound_placement::engine };
|
sound_source engine_turbo { sound_placement::engine };
|
||||||
double engine_turbo_pitch { 1.0 };
|
double engine_turbo_pitch { 1.0 };
|
||||||
sound_source oil_pump { sound_placement::engine };
|
sound_source oil_pump { sound_placement::engine };
|
||||||
|
sound_source radiator_fan { sound_placement::engine };
|
||||||
|
sound_source radiator_fan_aux { sound_placement::engine };
|
||||||
sound_source transmission { sound_placement::engine };
|
sound_source transmission { sound_placement::engine };
|
||||||
sound_source rsEngageSlippery { sound_placement::engine }; // moved from cab
|
sound_source rsEngageSlippery { sound_placement::engine }; // moved from cab
|
||||||
|
|
||||||
@@ -372,6 +374,8 @@ private:
|
|||||||
TButton btHeadSignals23;
|
TButton btHeadSignals23;
|
||||||
TButton btMechanik1;
|
TButton btMechanik1;
|
||||||
TButton btMechanik2;
|
TButton btMechanik2;
|
||||||
|
TButton btShutters1; // cooling shutters for primary water circuit
|
||||||
|
TButton btShutters2; // cooling shutters for auxiliary water circuit
|
||||||
|
|
||||||
double dRailLength { 0.0 };
|
double dRailLength { 0.0 };
|
||||||
std::vector<axle_sounds> m_axlesounds;
|
std::vector<axle_sounds> m_axlesounds;
|
||||||
|
|||||||
@@ -7798,8 +7798,9 @@ void TMoverParameters::LoadFIZ_Brake( std::string const &line ) {
|
|||||||
DeltaPipePress = HighPipePress - LowPipePress;
|
DeltaPipePress = HighPipePress - LowPipePress;
|
||||||
|
|
||||||
extract_value( VeselVolume, "Vv", line, "" );
|
extract_value( VeselVolume, "Vv", line, "" );
|
||||||
|
/*
|
||||||
if( VeselVolume == 0.0 ) { VeselVolume = 0.01; }
|
if( VeselVolume == 0.0 ) { VeselVolume = 0.01; }
|
||||||
|
*/
|
||||||
extract_value( MinCompressor, "MinCP", line, "" );
|
extract_value( MinCompressor, "MinCP", line, "" );
|
||||||
extract_value( MaxCompressor, "MaxCP", line, "" );
|
extract_value( MaxCompressor, "MaxCP", line, "" );
|
||||||
extract_value( CompressorSpeed, "CompressorSpeed", line, "" );
|
extract_value( CompressorSpeed, "CompressorSpeed", line, "" );
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Copyright (C) 2007-2014 Maciej Cierniak
|
|||||||
|
|
||||||
static double const DPL = 0.25;
|
static double const DPL = 0.25;
|
||||||
double const TFV4aM::pos_table[11] = {-2, 6, -1, 0, -2, 1, 4, 6, 0, 0, 0};
|
double const TFV4aM::pos_table[11] = {-2, 6, -1, 0, -2, 1, 4, 6, 0, 0, 0};
|
||||||
double const TMHZ_EN57::pos_table[11] = {-2, 10, -1, 0, 0, 2, 9, 10, 0, 0, 0};
|
double const TMHZ_EN57::pos_table[11] = {-1, 10, -1, 0, 0, 2, 9, 10, 0, 0, 0};
|
||||||
double const TM394::pos_table[11] = {-1, 5, -1, 0, 1, 2, 4, 5, 0, 0, 0};
|
double const TM394::pos_table[11] = {-1, 5, -1, 0, 1, 2, 4, 5, 0, 0, 0};
|
||||||
double const TH14K1::BPT_K[6][2] = {{10, 0}, {4, 1}, {0, 1}, {4, 0}, {4, -1}, {15, -1}};
|
double const TH14K1::BPT_K[6][2] = {{10, 0}, {4, 1}, {0, 1}, {4, 0}, {4, -1}, {15, -1}};
|
||||||
double const TH14K1::pos_table[11] = {-1, 4, -1, 0, 1, 2, 3, 4, 0, 0, 0};
|
double const TH14K1::pos_table[11] = {-1, 4, -1, 0, 1, 2, 3, 4, 0, 0, 0};
|
||||||
|
|||||||
@@ -764,7 +764,7 @@ void TTrain::OnCommand_secondcontrollerincrease( TTrain *Train, command_data con
|
|||||||
// on press or hold
|
// on press or hold
|
||||||
if( Train->mvControlled->ShuntMode ) {
|
if( Train->mvControlled->ShuntMode ) {
|
||||||
Train->mvControlled->AnPos = clamp(
|
Train->mvControlled->AnPos = clamp(
|
||||||
Train->mvControlled->AnPos + ( Command.time_delta * 2.0 ),
|
Train->mvControlled->AnPos + 0.025,
|
||||||
0.0, 1.0 );
|
0.0, 1.0 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -825,7 +825,7 @@ void TTrain::OnCommand_secondcontrollerdecrease( TTrain *Train, command_data con
|
|||||||
// on press or hold
|
// on press or hold
|
||||||
if( Train->mvControlled->ShuntMode ) {
|
if( Train->mvControlled->ShuntMode ) {
|
||||||
Train->mvControlled->AnPos = clamp(
|
Train->mvControlled->AnPos = clamp(
|
||||||
Train->mvControlled->AnPos - ( Command.time_delta * 2.0 ),
|
Train->mvControlled->AnPos - 0.025,
|
||||||
0.0, 1.0 );
|
0.0, 1.0 );
|
||||||
}
|
}
|
||||||
Train->mvControlled->DecScndCtrl( 1 );
|
Train->mvControlled->DecScndCtrl( 1 );
|
||||||
@@ -7051,6 +7051,7 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con
|
|||||||
auto &gauge = Cabine[Cabindex].Gauge(-1); // pierwsza wolna gałka
|
auto &gauge = Cabine[Cabindex].Gauge(-1); // pierwsza wolna gałka
|
||||||
gauge.Load(Parser, DynamicObject, DynamicObject->mdKabina);
|
gauge.Load(Parser, DynamicObject, DynamicObject->mdKabina);
|
||||||
gauge.AssignDouble(&mvControlled->AnPos);
|
gauge.AssignDouble(&mvControlled->AnPos);
|
||||||
|
m_controlmapper.insert( gauge, "shuntmodepower:" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -215,6 +215,9 @@ mouse_input::default_bindings() {
|
|||||||
{ "scndctrl:", {
|
{ "scndctrl:", {
|
||||||
user_command::secondcontrollerincrease,
|
user_command::secondcontrollerincrease,
|
||||||
user_command::secondcontrollerdecrease } },
|
user_command::secondcontrollerdecrease } },
|
||||||
|
{ "shuntmodepower:", {
|
||||||
|
user_command::secondcontrollerincrease,
|
||||||
|
user_command::secondcontrollerdecrease } },
|
||||||
{ "dirkey:", {
|
{ "dirkey:", {
|
||||||
user_command::reverserincrease,
|
user_command::reverserincrease,
|
||||||
user_command::reverserdecrease } },
|
user_command::reverserdecrease } },
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ std::string
|
|||||||
static std::unordered_map<std::string, std::string> m_cabcontrols = {
|
static std::unordered_map<std::string, std::string> m_cabcontrols = {
|
||||||
{ "mainctrl:", "master controller" },
|
{ "mainctrl:", "master controller" },
|
||||||
{ "scndctrl:", "second controller" },
|
{ "scndctrl:", "second controller" },
|
||||||
|
{ "shuntmodepower:", "shunt mode power" },
|
||||||
{ "dirkey:" , "reverser" },
|
{ "dirkey:" , "reverser" },
|
||||||
{ "brakectrl:", "train brake" },
|
{ "brakectrl:", "train brake" },
|
||||||
{ "localbrake:", "independent brake" },
|
{ "localbrake:", "independent brake" },
|
||||||
|
|||||||
Reference in New Issue
Block a user