mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
build 200908. minor bug fixes
This commit is contained in:
@@ -5969,16 +5969,17 @@ double TMoverParameters::TractionForce( double dt ) {
|
|||||||
SpeedCtrlUnit.IsActive = ( SpeedCtrlValue > 0 );
|
SpeedCtrlUnit.IsActive = ( SpeedCtrlValue > 0 );
|
||||||
}
|
}
|
||||||
double edBCP = Hamulec->GetEDBCP();
|
double edBCP = Hamulec->GetEDBCP();
|
||||||
|
auto const localbrakeactive { ( CabOccupied != 0 ) && ( LocHandle->GetCP() > 0.25 ) };
|
||||||
if( ( false == Doors.instances[ side::left ].is_closed )
|
if( ( false == Doors.instances[ side::left ].is_closed )
|
||||||
|| ( false == Doors.instances[ side::right ].is_closed )
|
|| ( false == Doors.instances[ side::right ].is_closed )
|
||||||
|| ( Doors.permit_needed && ( Doors.instances[ side::left ].open_permit || Doors.instances[ side::right ].open_permit ) ) ) {
|
|| ( Doors.permit_needed && ( Doors.instances[ side::left ].open_permit || Doors.instances[ side::right ].open_permit ) ) ) {
|
||||||
DynamicBrakeFlag = true;
|
DynamicBrakeFlag = true;
|
||||||
}
|
}
|
||||||
else if (((edBCP < 0.25) && (LocHandle->GetCP() < 0.25) && (AnPos < 0.01)) ||
|
else if (((edBCP < 0.25) && (false == localbrakeactive) && (AnPos < 0.01))
|
||||||
((edBCP < 0.25) && (ShuntModeAllow) && (LocalBrakePosA < 0.01)))
|
|| ((edBCP < 0.25) && (ShuntModeAllow) && (LocalBrakePosA < 0.01)))
|
||||||
DynamicBrakeFlag = false;
|
DynamicBrakeFlag = false;
|
||||||
else if ((((BrakePress > 0.25) && (edBCP > 0.25) || (LocHandle->GetCP() > 0.25))) ||
|
else if ((((BrakePress > 0.25) && (edBCP > 0.25) || localbrakeactive))
|
||||||
(AnPos > 0.02))
|
|| (AnPos > 0.02))
|
||||||
DynamicBrakeFlag = true;
|
DynamicBrakeFlag = true;
|
||||||
edBCP = Hamulec->GetEDBCP() * eimc[eimc_p_abed]; // stala napedu
|
edBCP = Hamulec->GetEDBCP() * eimc[eimc_p_abed]; // stala napedu
|
||||||
if ((DynamicBrakeFlag))
|
if ((DynamicBrakeFlag))
|
||||||
|
|||||||
@@ -767,7 +767,8 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
|
|||||||
update_vehicle_brake().c_str(),
|
update_vehicle_brake().c_str(),
|
||||||
mover.LoadFlag,
|
mover.LoadFlag,
|
||||||
mover.LocalBrakePosA,
|
mover.LocalBrakePosA,
|
||||||
( mover.ManualBrakePos / ManualBrakePosNo ),
|
mover.LocalBrakePosAEIM,
|
||||||
|
( mover.ManualBrakePos / static_cast<float>( ManualBrakePosNo ) ),
|
||||||
( mover.SpringBrake.Activate ? 1.f : 0.f ),
|
( mover.SpringBrake.Activate ? 1.f : 0.f ),
|
||||||
// cylinders
|
// cylinders
|
||||||
mover.BrakePress,
|
mover.BrakePress,
|
||||||
|
|||||||
26
sound.cpp
26
sound.cpp
@@ -959,6 +959,7 @@ sound_source::update_soundproofing() {
|
|||||||
if( soundproofingstamp == m_properties.soundproofing_stamp ) { return false; }
|
if( soundproofingstamp == m_properties.soundproofing_stamp ) { return false; }
|
||||||
|
|
||||||
// listener location has changed, calculate new location-based gain factor
|
// listener location has changed, calculate new location-based gain factor
|
||||||
|
auto const externalcamera { ( Global.CabWindowOpen ) || ( Global.pCamera.m_owner && FreeFlyModeFlag ) };
|
||||||
switch( m_placement ) {
|
switch( m_placement ) {
|
||||||
case sound_placement::general: {
|
case sound_placement::general: {
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
@@ -970,21 +971,20 @@ sound_source::update_soundproofing() {
|
|||||||
case sound_placement::external: {
|
case sound_placement::external: {
|
||||||
if( m_range >= -1 ) { // limited range sound...
|
if( m_range >= -1 ) { // limited range sound...
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
( soundproofingstamp == 0 ? EU07_SOUNDPROOFING_NONE : // ...and listener outside
|
soundproofingstamp == 0 ? EU07_SOUNDPROOFING_NONE : // ...with listener outside
|
||||||
true == Global.CabWindowOpen ? EU07_SOUNDPROOFING_SOME : // ...and window open
|
externalcamera ? EU07_SOUNDPROOFING_SOME : // ...with listener inside and window open
|
||||||
EU07_SOUNDPROOFING_STRONG ) ); // ...and window closed
|
EU07_SOUNDPROOFING_STRONG ); // ...with listener inside and window closed
|
||||||
}
|
}
|
||||||
else { // global sound...
|
else { // global sound...
|
||||||
auto const externalcamera { ( Global.CabWindowOpen ) || ( Global.pCamera.m_owner && FreeFlyModeFlag ) };
|
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
( soundproofingstamp == 0 ? EU07_SOUNDPROOFING_GLOBAL_NONE : // ...and listener outside
|
soundproofingstamp == 0 ? EU07_SOUNDPROOFING_GLOBAL_NONE : // ...with listener outside
|
||||||
externalcamera ? EU07_SOUNDPROOFING_GLOBAL_STRONG : // ...and window open
|
externalcamera ? EU07_SOUNDPROOFING_GLOBAL_STRONG : // ...with listener inside and window open
|
||||||
EU07_SOUNDPROOFING_GLOBAL_VERYSTRONG ) ); // ...and window closed
|
EU07_SOUNDPROOFING_GLOBAL_VERYSTRONG ); // ...with listener inside and window closed
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case sound_placement::internal: {
|
case sound_placement::internal: {
|
||||||
if( m_range >= -1 ) {
|
if( m_range >= -1 ) { // limited range sound
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
soundproofingstamp == 0 ?
|
soundproofingstamp == 0 ?
|
||||||
EU07_SOUNDPROOFING_STRONG : // listener outside HACK: won't be true if active vehicle has open window
|
EU07_SOUNDPROOFING_STRONG : // listener outside HACK: won't be true if active vehicle has open window
|
||||||
@@ -994,7 +994,7 @@ sound_source::update_soundproofing() {
|
|||||||
EU07_SOUNDPROOFING_STRONG : // listener in the engine compartment
|
EU07_SOUNDPROOFING_STRONG : // listener in the engine compartment
|
||||||
EU07_SOUNDPROOFING_NONE ) ) ); // listener in the cab of the same vehicle
|
EU07_SOUNDPROOFING_NONE ) ) ); // listener in the cab of the same vehicle
|
||||||
}
|
}
|
||||||
else {
|
else { // global sound
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
soundproofingstamp == 0 ?
|
soundproofingstamp == 0 ?
|
||||||
EU07_SOUNDPROOFING_GLOBAL_STRONG : // listener outside HACK: won't be true if active vehicle has open window
|
EU07_SOUNDPROOFING_GLOBAL_STRONG : // listener outside HACK: won't be true if active vehicle has open window
|
||||||
@@ -1007,9 +1007,9 @@ sound_source::update_soundproofing() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case sound_placement::engine: {
|
case sound_placement::engine: {
|
||||||
if( m_range >= -1 ) {
|
if( m_range >= -1 ) { // limited range sound
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
( ( soundproofingstamp == 0 ) || ( true == Global.CabWindowOpen ) ) ?
|
externalcamera ?
|
||||||
EU07_SOUNDPROOFING_SOME : // listener outside or has a window open
|
EU07_SOUNDPROOFING_SOME : // listener outside or has a window open
|
||||||
( simulation::Train->Dynamic() != m_owner ?
|
( simulation::Train->Dynamic() != m_owner ?
|
||||||
EU07_SOUNDPROOFING_STRONG : // in another vehicle
|
EU07_SOUNDPROOFING_STRONG : // in another vehicle
|
||||||
@@ -1017,9 +1017,9 @@ sound_source::update_soundproofing() {
|
|||||||
EU07_SOUNDPROOFING_NONE : // listener in the engine compartment
|
EU07_SOUNDPROOFING_NONE : // listener in the engine compartment
|
||||||
EU07_SOUNDPROOFING_STRONG ) ) ); // listener in another compartment of the same vehicle
|
EU07_SOUNDPROOFING_STRONG ) ) ); // listener in another compartment of the same vehicle
|
||||||
}
|
}
|
||||||
else {
|
else { // global sound
|
||||||
m_properties.soundproofing = (
|
m_properties.soundproofing = (
|
||||||
( ( soundproofingstamp == 0 ) || ( true == Global.CabWindowOpen ) ) ?
|
( externalcamera ) ?
|
||||||
EU07_SOUNDPROOFING_GLOBAL_STRONG : // listener outside or has a window open
|
EU07_SOUNDPROOFING_GLOBAL_STRONG : // listener outside or has a window open
|
||||||
( simulation::Train->Dynamic() != m_owner ?
|
( simulation::Train->Dynamic() != m_owner ?
|
||||||
EU07_SOUNDPROOFING_GLOBAL_VERYSTRONG : // in another vehicle
|
EU07_SOUNDPROOFING_GLOBAL_VERYSTRONG : // in another vehicle
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ init() {
|
|||||||
"Controllers:\n master: %d(%d), secondary: %s\nEngine output: %.1f, current: %.0f\nRevolutions:\n engine: %.0f, motors: %.0f\n engine fans: %.0f, motor fans: %.0f+%.0f, cooling fans: %.0f+%.0f",
|
"Controllers:\n master: %d(%d), secondary: %s\nEngine output: %.1f, current: %.0f\nRevolutions:\n engine: %.0f, motors: %.0f\n engine fans: %.0f, motor fans: %.0f+%.0f, cooling fans: %.0f+%.0f",
|
||||||
" (shunt mode)",
|
" (shunt mode)",
|
||||||
"\nTemperatures:\n engine: %.2f, oil: %.2f, water: %.2f%c%.2f",
|
"\nTemperatures:\n engine: %.2f, oil: %.2f, water: %.2f%c%.2f",
|
||||||
"Brakes:\n train: %.2f (mode: %d, delay: %s, load flag: %d)\n independent: %.2f, manual: %.2f, spring: %.2f\nBrake cylinder pressures:\n train: %.2f, independent: %.2f, status: 0x%.2x\nPipe pressures:\n brake: %.2f (hat: %.2f), main: %.2f, control: %.2f\nTank pressures:\n auxiliary: %.2f, main: %.2f, control: %.2f",
|
"Brakes:\n train: %.2f (mode: %d, delay: %s, load flag: %d)\n independent: %.2f (%.2f), manual: %.2f, spring: %.2f\nBrake cylinder pressures:\n train: %.2f, independent: %.2f, status: 0x%.2x\nPipe pressures:\n brake: %.2f (hat: %.2f), main: %.2f, control: %.2f\nTank pressures:\n auxiliary: %.2f, main: %.2f, control: %.2f",
|
||||||
" pantograph: %.2f%cMT",
|
" pantograph: %.2f%cMT",
|
||||||
"Forces:\n tractive: %.1f, brake: %.1f, friction: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]",
|
"Forces:\n tractive: %.1f, brake: %.1f, friction: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]",
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ init() {
|
|||||||
"Nastawniki:\n glowny: %d(%d), dodatkowy: %s\nMoc silnika: %.1f, prad silnika: %.0f\nObroty:\n silnik: %.0f, motory: %.0f\n went.silnika: %.0f, went.motorow: %.0f+%.0f, went.chlodnicy: %.0f+%.0f",
|
"Nastawniki:\n glowny: %d(%d), dodatkowy: %s\nMoc silnika: %.1f, prad silnika: %.0f\nObroty:\n silnik: %.0f, motory: %.0f\n went.silnika: %.0f, went.motorow: %.0f+%.0f, went.chlodnicy: %.0f+%.0f",
|
||||||
" (tryb manewrowy)",
|
" (tryb manewrowy)",
|
||||||
"\nTemperatury:\n silnik: %.2f, olej: %.2f, woda: %.2f%c%.2f",
|
"\nTemperatury:\n silnik: %.2f, olej: %.2f, woda: %.2f%c%.2f",
|
||||||
"Hamulce:\n zespolony: %.2f (tryb: %d, nastawa: %s, ladunek: %d)\n pomocniczy: %.2f, postojowy: %.2f, sprezynowy: %.2f\nCisnienie w cylindrach:\n zespolony: %.2f, pomocniczy: %.2f, status: 0x%.2x\nCisnienia w przewodach:\n glowny: %.2f (kapturek: %.2f), zasilajacy: %.2f, kontrolny: %.2f\nCisnienia w zbiornikach:\n pomocniczy: %.2f, glowny: %.2f, sterujacy: %.2f",
|
"Hamulce:\n zespolony: %.2f (tryb: %d, nastawa: %s, ladunek: %d)\n pomocniczy: %.2f (%.2f), postojowy: %.2f, sprezynowy: %.2f\nCisnienie w cylindrach:\n zespolony: %.2f, pomocniczy: %.2f, status: 0x%.2x\nCisnienia w przewodach:\n glowny: %.2f (kapturek: %.2f), zasilajacy: %.2f, kontrolny: %.2f\nCisnienia w zbiornikach:\n pomocniczy: %.2f, glowny: %.2f, sterujacy: %.2f",
|
||||||
" pantograf: %.2f%cZG",
|
" pantograf: %.2f%cZG",
|
||||||
"Sily:\n napedna: %.1f, hamowania: %.1f, tarcie: %.2f%s\nPrzyspieszenia:\n styczne: %.2f, normalne: %.2f (promien: %s)\nPredkosc: %.2f, pokonana odleglosc: %.2f\nPozycja: [%.2f, %.2f, %.2f]",
|
"Sily:\n napedna: %.1f, hamowania: %.1f, tarcie: %.2f%s\nPrzyspieszenia:\n styczne: %.2f, normalne: %.2f (promien: %s)\nPredkosc: %.2f, pokonana odleglosc: %.2f\nPozycja: [%.2f, %.2f, %.2f]",
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user