17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 20:19:20 +02:00

fix(sonar): addressing reliability/security issues

This commit is contained in:
jerrrrycho
2026-10-03 20:21:28 +02:00
parent 51521a135a
commit d88fa5d8e2
32 changed files with 189 additions and 162 deletions

View File

@@ -137,6 +137,11 @@ state_manager::update_scripting_interface() {
auto *time{ Memory.find( "__simulation.time" ) };
auto *date{ Memory.find( "__simulation.date" ) };
if( weather == nullptr || time == nullptr || date == nullptr ) {
// scripting interface cells weren't created, nothing to synchronize
return;
}
if( simulation::is_ready ) {
// potentially adjust weather
if( weather->Value1() != m_scriptinginterface.weather->Value1() ) {
@@ -396,7 +401,6 @@ void state_manager::process_commands() {
pantograph.fLenL1 * std::sin( pantograph.fAngleL )
+ pantograph.fLenU1 * std::sin( pantograph.fAngleU )
+ pantograph.fHeight;
vehicle->MoverParameters->EnginePowerSource.CollectorParameters.CollectorsNo;
}
vehicle = vehicle->Prev();