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

fix for trace route early return on full speed signal, fix for tachometers initialization

This commit is contained in:
tmj-fstate
2017-06-03 17:14:02 +02:00
parent 5f0069bf60
commit 135ac514f4
5 changed files with 16 additions and 54 deletions

View File

@@ -481,7 +481,7 @@ void TController::TableTraceRoute(double fDistance, TDynamicObject *pVehicle)
}
// kontynuacja skanowania od ostatnio sprawdzonego toru (w ostatniej pozycji zawsze jest tor)
if( ( SemNextStopIndex != -1 )
&& ( sSpeedTable[SemNextStopIndex].fVelNext < 1.0 ) ) {
&& ( sSpeedTable[SemNextStopIndex].fVelNext == 0.0 ) ) {
// znaleziono semafor lub tarczę lub tor z prędkością zero, trzeba sprawdzić czy to nadał semafor
// jeśli jest następny semafor to sprawdzamy czy to on nadał zero
if( ( OrderCurrentGet() & Obey_train )

View File

@@ -4400,16 +4400,6 @@ bool TTrain::Update( double const Deltatime )
{ // ustawienie zmiennych dla silnika spalinowego
fEngine[1] = mvControlled->ShowEngineRotation(1);
fEngine[2] = mvControlled->ShowEngineRotation(2);
// if (ggEnrot1m.SubModel)
//{
// ggEnrot1m.UpdateValue(mvControlled->ShowEngineRotation(1));
// ggEnrot1m.Update();
//}
// if (ggEnrot2m.SubModel)
//{
// ggEnrot2m.UpdateValue(mvControlled->ShowEngineRotation(2));
// ggEnrot2m.Update();
//}
}
else if (mvControlled->EngineType == DieselEngine)
@@ -4417,34 +4407,12 @@ bool TTrain::Update( double const Deltatime )
fEngine[1] = mvControlled->ShowEngineRotation(1);
fEngine[2] = mvControlled->ShowEngineRotation(2);
fEngine[3] = mvControlled->ShowEngineRotation(3);
// if (ggEnrot1m.SubModel)
//{
// ggEnrot1m.UpdateValue(mvControlled->ShowEngineRotation(1));
// ggEnrot1m.Update();
//}
// if (ggEnrot2m.SubModel)
//{
// ggEnrot2m.UpdateValue(mvControlled->ShowEngineRotation(2));
// ggEnrot2m.Update();
//}
// if (ggEnrot3m.SubModel)
// if (mvControlled->Couplers[1].Connected)
// {
// ggEnrot3m.UpdateValue(mvControlled->ShowEngineRotation(3));
// ggEnrot3m.Update();
// }
// if (ggEngageRatio.SubModel)
//{
// ggEngageRatio.UpdateValue(mvControlled->dizel_engage);
// ggEngageRatio.Update();
//}
if (ggMainGearStatus.SubModel)
{
if (mvControlled->Mains)
ggMainGearStatus.UpdateValue(1.1 -
fabs(mvControlled->dizel_automaticgearstatus));
ggMainGearStatus.UpdateValue(1.1 - std::abs(mvControlled->dizel_automaticgearstatus));
else
ggMainGearStatus.UpdateValue(0);
ggMainGearStatus.UpdateValue(0.0);
ggMainGearStatus.Update();
}
if (ggIgnitionKey.SubModel)

22
Train.h
View File

@@ -449,23 +449,17 @@ public: // reszta może by?publiczna
int CAflag; // hunter-131211: dla osobnego zbijania CA i SHP
double fPoslizgTimer;
// double fShpTimer;
// double fDblClickTimer;
// ABu: Przeniesione do public. - Wiem, ze to nieladnie...
// bool CabChange(int iDirection);
// bool InitializeCab(int NewCabNo, AnsiString asFileName);
TTrack *tor;
int keybrakecount;
// McZapkie-240302 - przyda sie do tachometru
float fTachoVelocity;
float fTachoVelocityJump; // ze skakaniem
float fTachoTimer;
float fTachoCount;
float fHVoltage; // napi?cie dla dynamicznych ga?ek
float fHCurrent[4]; // pr?dy: suma i amperomierze 1,2,3
float fEngine[4]; // obroty te? trzeba pobra?
int iCarNo, iPowerNo, iUnitNo; // liczba pojazdow, czlonow napednych i jednostek spiętych ze
// sobą
float fTachoVelocity{ 0.0f };
float fTachoVelocityJump{ 0.0f }; // ze skakaniem
float fTachoTimer{ 0.0f };
float fTachoCount{ 0.0f };
float fHVoltage{ 0.0f }; // napi?cie dla dynamicznych ga?ek
float fHCurrent[ 4 ] = { 0.0f, 0.0f, 0.0f, 0.0f }; // pr?dy: suma i amperomierze 1,2,3
float fEngine[ 4 ] = { 0.0f, 0.0f, 0.0f, 0.0f }; // obroty te? trzeba pobra?
int iCarNo, iPowerNo, iUnitNo; // liczba pojazdow, czlonow napednych i jednostek spiętych ze sobą
bool bDoors[20][3]; // drzwi dla wszystkich czlonow
int iUnits[20]; // numer jednostki
int iDoorNo[20]; // liczba drzwi

View File

@@ -1,5 +1,5 @@
#pragma once
#define VERSION_MAJOR 17
#define VERSION_MINOR 602
#define VERSION_MINOR 603
#define VERSION_REVISION 0