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

Add random 0 speed from range 0-4 on tachometerb

This commit is contained in:
2025-01-06 20:05:11 +01:00
parent eeb3387b33
commit d72c709fff

View File

@@ -6949,10 +6949,11 @@ bool TTrain::Update( double const Deltatime )
// pomiar, pol sekundy ustawienie // pomiar, pol sekundy ustawienie
if (ff != fTachoTimer) // jesli w tej sekundzie nie zmienial if (ff != fTachoTimer) // jesli w tej sekundzie nie zmienial
{ {
if (fTachoVelocity > 1) // jedzie if (fTachoVelocity >= 5) // jedzie
fTachoVelocityJump = fTachoVelocity + (2.0 - LocalRandom(3) + LocalRandom(3)) * 0.5; fTachoVelocityJump = fTachoVelocity + (2.0 - LocalRandom(3) + LocalRandom(3)) * 0.5;
else else if (2 < fTachoVelocity < 5)
fTachoVelocityJump = 0; // stoi fTachoVelocityJump = Random(0, 4); // tu ma sie bujac jak wariat i zatrzymac na jakiejs predkosci
// fTachoVelocityJump = 0; // stoi
fTachoTimer = ff; // juz zmienil fTachoTimer = ff; // juz zmienil
} }
} }
@@ -10085,7 +10086,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
{ "i-universal8:", btUniversals[ 8 ] }, { "i-universal8:", btUniversals[ 8 ] },
{ "i-universal9:", btUniversals[ 9 ] }, { "i-universal9:", btUniversals[ 9 ] },
{ "i-cabactived:", btCabActived }, { "i-cabactived:", btCabActived },
{"i-compressor:", btCompressors } {"i-compressorany:", btCompressors }
}; };
{ {
auto lookup = lights.find( Label ); auto lookup = lights.find( Label );