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

train acceleration logic tweak, train protection system magnet activation tweak

This commit is contained in:
tmj-fstate
2021-05-22 23:29:05 +02:00
parent eaa3b647e4
commit b4392c25b9
2 changed files with 22 additions and 12 deletions

View File

@@ -11507,7 +11507,7 @@ bool TMoverParameters::CheckLocomotiveParameters(bool ReadyFlag, int Dir)
// security system
// by default place the magnet in the vehicle centre
if( SecuritySystem.MagnetLocation == 0 ) {
SecuritySystem.MagnetLocation = Dim.L / 2 - 0.25;
SecuritySystem.MagnetLocation = Dim.L / 2 - 0.5;
}
SecuritySystem.MagnetLocation = clamp( SecuritySystem.MagnetLocation, 0.0, Dim.L );
@@ -12042,7 +12042,7 @@ bool TMoverParameters::RunCommand( std::string Command, double CValue1, double C
{
SecuritySystem.VelocityAllowed = static_cast<int>(floor(CValue1));
SecuritySystem.NextVelocityAllowed = static_cast<int>(floor(CValue2));
SecuritySystem.SystemSoundSHPTimer = 0; // hunter-091012
// SecuritySystem.SystemSoundSHPTimer = 0; // hunter-091012
SetFlag(SecuritySystem.Status, s_active);
}
// else OK:=false;