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

basic support for dmu vehicle type, cab sound positioning fix

This commit is contained in:
tmj-fstate
2018-01-29 01:28:27 +01:00
parent 1b655fac9b
commit 6696a3536d
4 changed files with 81 additions and 35 deletions

View File

@@ -208,6 +208,7 @@ enum sound {
//szczególne typy pojazdów (inna obsługa) dla zmiennej TrainType
//zamienione na flagi bitowe, aby szybko wybierać grupę (np. EZT+SZT)
// TODO: convert to enums, they're used as specific checks anyway
static int const dt_Default = 0;
static int const dt_EZT = 1;
static int const dt_ET41 = 2;
@@ -218,6 +219,7 @@ static int const dt_SN61 = 0x20; //nie używane w warunkach, ale ustawiane z CHK
static int const dt_EP05 = 0x40;
static int const dt_ET40 = 0x80;
static int const dt_181 = 0x100;
static int const dt_DMU = 0x200;
//stałe dla asynchronów
static int const eimc_s_dfic = 0;

View File

@@ -3846,6 +3846,9 @@ double TMoverParameters::BrakeForceR(double ratio, double velocity)
ratio = ratio + (1.5 - ratio)*std::min(1.0, Vel*0.02);
if ((BrakeDelayFlag&bdelay_R) && (BrakeMethod%128 != bp_Cosid) && (BrakeMethod % 128 != bp_D1) && (BrakeMethod % 128 != bp_D2) && (Power<1) && (velocity<40))
ratio = ratio / 2;
if( ( TrainType == dt_DMU ) && ( velocity < 30.0 ) ) {
ratio -= 0.3;
}
}
}
@@ -4294,7 +4297,7 @@ double TMoverParameters::TractionForce(double dt)
case DieselElectric: {
if( true == Mains ) {
// TBD, TODO: currently ignores RVentType, fix this?
RventRot += clamp( DElist[ MainCtrlPos ].RPM - RventRot, -100.0, 50.0 ) * dt;
RventRot += clamp( DElist[ MainCtrlPos ].RPM / 60.0 - RventRot, -100.0, 50.0 ) * dt;
}
else {
RventRot *= std::max( 0.0, 1.0 - RVentSpeed * dt );
@@ -6978,6 +6981,7 @@ void TMoverParameters::LoadFIZ_Param( std::string const &line ) {
std::map<std::string, int> types{
{ "pseudodiesel", dt_PseudoDiesel },
{ "ezt", dt_EZT },
{ "dmu", dt_DMU },
{ "sn61", dt_SN61 },
{ "et22", dt_ET22 },
{ "et40", dt_ET40 },