mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 23:19:19 +02:00
Fixed keys misalignment, corrected calculation of passengerstop
This commit is contained in:
@@ -1185,6 +1185,7 @@ TController::TableUpdateStopPoint( TCommandType &Command, TSpeedPos &Point, doub
|
|||||||
L = std::max(0.0, std::min(L, std::abs(Par2) - fMinProximityDist - fLength));
|
L = std::max(0.0, std::min(L, std::abs(Par2) - fMinProximityDist - fLength));
|
||||||
Point.UpdateDistance(L);
|
Point.UpdateDistance(L);
|
||||||
Point.bMoved = true;
|
Point.bMoved = true;
|
||||||
|
Point.fMoved = L;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Point.iFlags = 0;
|
Point.iFlags = 0;
|
||||||
@@ -1192,7 +1193,7 @@ TController::TableUpdateStopPoint( TCommandType &Command, TSpeedPos &Point, doub
|
|||||||
}
|
}
|
||||||
// for human-driven vehicles discard the stop point if they leave it far enough behind
|
// for human-driven vehicles discard the stop point if they leave it far enough behind
|
||||||
if( ( false == AIControllFlag )
|
if( ( false == AIControllFlag )
|
||||||
&& ( Point.fDist < -1 * std::max( fLength + 100, 250.0 ) ) ) {
|
&& ( Point.fDist < -1 * std::max( fLength + 100, 250.0 ) - Point.fMoved ) ) {
|
||||||
Point.iFlags = 0; // nie liczy się już zupełnie (nie wyśle SetVelocity)
|
Point.iFlags = 0; // nie liczy się już zupełnie (nie wyśle SetVelocity)
|
||||||
Point.fVelNext = -1; // można jechać za W4
|
Point.fVelNext = -1; // można jechać za W4
|
||||||
if( ( Point.fDist <= 0.0 ) && ( eSignNext == Point.evEvent ) ) {
|
if( ( Point.fDist <= 0.0 ) && ( eSignNext == Point.evEvent ) ) {
|
||||||
@@ -1209,7 +1210,7 @@ TController::TableUpdateStopPoint( TCommandType &Command, TSpeedPos &Point, doub
|
|||||||
// jeśli długość peronu ((sSpeedTable[i].evEvent->ValueGet(2)) nie podana,
|
// jeśli długość peronu ((sSpeedTable[i].evEvent->ValueGet(2)) nie podana,
|
||||||
// przyjąć odległość fMinProximityDist
|
// przyjąć odległość fMinProximityDist
|
||||||
&& ( ( iDrivigFlags & moveStopCloser ) != 0 ?
|
&& ( ( iDrivigFlags & moveStopCloser ) != 0 ?
|
||||||
Point.fDist + fLength <=
|
Point.fDist + fLength + (Point.fMoved - fMinProximityDist * 0.5f) <=
|
||||||
std::max(
|
std::max(
|
||||||
std::abs( Point.evEvent->input_value( 2 ) ),
|
std::abs( Point.evEvent->input_value( 2 ) ),
|
||||||
2.0 * fMaxProximityDist + fLength ) : // fmaxproximitydist typically equals ~50 m
|
2.0 * fMaxProximityDist + fLength ) : // fmaxproximitydist typically equals ~50 m
|
||||||
|
|||||||
1
Driver.h
1
Driver.h
@@ -144,6 +144,7 @@ class TSpeedPos
|
|||||||
double fSectionVelocityDist{ 0.0 }; // długość ograniczenia prędkości
|
double fSectionVelocityDist{ 0.0 }; // długość ograniczenia prędkości
|
||||||
int iFlags{ spNone }; // flagi typu wpisu do tabelki
|
int iFlags{ spNone }; // flagi typu wpisu do tabelki
|
||||||
bool bMoved{ false }; // czy przesunięty (dotyczy punktu zatrzymania w peronie)
|
bool bMoved{ false }; // czy przesunięty (dotyczy punktu zatrzymania w peronie)
|
||||||
|
double fMoved{ 0.0 }; // ile przesunięty (dotyczy punktu zatrzymania w peronie)
|
||||||
Math3D::vector3 vPos; // współrzędne XYZ do liczenia odległości
|
Math3D::vector3 vPos; // współrzędne XYZ do liczenia odległości
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ commanddescription_sequence Commands_descriptions = {
|
|||||||
{ "doorcloseall", command_target::vehicle },
|
{ "doorcloseall", command_target::vehicle },
|
||||||
{ "doorsteptoggle", command_target::vehicle },
|
{ "doorsteptoggle", command_target::vehicle },
|
||||||
{ "doormodetoggle", command_target::vehicle },
|
{ "doormodetoggle", command_target::vehicle },
|
||||||
|
{ "mirrorstoggle", command_target::vehicle },
|
||||||
{ "departureannounce", command_target::vehicle },
|
{ "departureannounce", command_target::vehicle },
|
||||||
{ "doorlocktoggle", command_target::vehicle },
|
{ "doorlocktoggle", command_target::vehicle },
|
||||||
{ "pantographcompressorvalvetoggle", command_target::vehicle },
|
{ "pantographcompressorvalvetoggle", command_target::vehicle },
|
||||||
|
|||||||
Reference in New Issue
Block a user