18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-17 09:14:10 +01:00

fix(simulation): a scenery's config block can't turn back on what a test keeps off

The config block of a scenery is read like the settings files, after the test
mode settings were applied, so a scenery with soundenabled, multiplayer,
execonexit, feedbackmode or the like in it got them back in a test run. The test
mode settings now are applied again after each config block of the scenery;
apply_test_mode_settings() moved to simulationtest.cpp for that.
This commit is contained in:
jerrrrycho
2026-11-08 11:22:37 +01:00
parent 7f8892cda6
commit 1626df2bc4
5 changed files with 59 additions and 51 deletions

View File

@@ -15,6 +15,7 @@ http://mozilla.org/MPL/2.0/.
#include "simulation/simulationtime.h"
#include "simulation/simulationsounds.h"
#include "simulation/simulationenvironment.h"
#include "simulation/simulationtest.h"
#include "scene/scenenodegroups.h"
#include "scene/scenelayers.h"
#include "scene/sceneterrain.h"
@@ -363,6 +364,10 @@ state_serializer::deserialize_config( cParser &Input, scene::scratch_data &Scrat
// config parameters (re)definition
Global.ConfigParse( Input );
if( Global.test.enabled ) {
// a scenery doesn't get to turn on what a test keeps off
simulation::apply_test_mode_settings();
}
}
void