mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
randomized delay for using of security system button by AI
This commit is contained in:
@@ -1170,7 +1170,12 @@ TController::cue_action( locale::string const Action, float const Actionparamete
|
||||
|
||||
case locale::string::driver_hint_securitysystemreset: {
|
||||
if( AIControllFlag ) {
|
||||
mvOccupied->SecuritySystemReset();
|
||||
auto time{ std::max(std::max(mvOccupied->SecuritySystem.SystemSoundSHPTimer, mvOccupied->SecuritySystem.SystemSoundCATimer),
|
||||
std::max(mvOccupied->SecuritySystem.SystemBrakeSHPTimer, mvOccupied->SecuritySystem.SystemBrakeCATimer)) };
|
||||
if (time > m_securitysystemreset) {
|
||||
mvOccupied->SecuritySystemReset();
|
||||
m_securitysystemreset = 0.5 + Random();
|
||||
}
|
||||
}
|
||||
hint(
|
||||
Action,
|
||||
|
||||
Reference in New Issue
Block a user