18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-04 07:04:42 +01:00

Merge remote-tracking branch 'origin/staging' into feat/rail-singing

# Conflicts:
#	application/drivermode.cpp
This commit is contained in:
maj00r
2026-12-02 18:13:21 +01:00
169 changed files with 16589 additions and 469 deletions
+17 -4
View File
@@ -18,6 +18,7 @@ http://mozilla.org/MPL/2.0/.
#include "simulation/simulationtime.h"
#include "simulation/simulationenvironment.h"
#include "simulation/simulationtest.h"
#include "simulation/simulationsnapshotworld.h"
#include "simulation/blackboxrecorder.h"
#include "scene/scene.h"
#include "rendering/lightarray.h"
@@ -365,6 +366,8 @@ bool driver_mode::update()
{
simulation::test().update(deltatime);
}
// the frame is complete: the snapshots asked for at this time are taken (--snapshot-at)
simulation::snapshot::update();
}
// render time routines follow:
@@ -487,17 +490,24 @@ bool driver_mode::update()
Timer::subsystem.switching.update();
Timer::subsystem.loop_audio.start();
simulation::Region->update_sounds();
if (Global.RailSinging)
// the test mode has no sound: the sounds of the scenery and of the vehicles aren't gone through. they draw from the local
// engine of Random() only (LocalRandom()), and clear the sound flags of the vehicles, which nothing else reads. nor do the rails sing
if (false == Global.test.enabled)
{
m_railsinging.update(deltarealtime);
simulation::Region->update_sounds();
if (Global.RailSinging)
{
m_railsinging.update(deltarealtime);
}
}
audio::renderer.update(Global.iPause ? 0.0 : deltarealtime);
Timer::subsystem.loop_audio.stop();
// NOTE: particle system runs on simulation time, but needs actual camera position to determine how to update each particle source
// nor smoke in the test mode, which draws nothing: the particles draw from the local engine of Random() only
Timer::subsystem.loop_particles.start();
simulation::Particles.update();
if (false == Global.test.enabled)
simulation::Particles.update();
Timer::subsystem.loop_particles.stop();
Timer::subsystem.loop_renderer_update.start();
@@ -565,6 +575,9 @@ void driver_mode::enter()
Timer::ResetTimers();
// the scenery is loaded and nothing runs yet: the state saved in a snapshot goes over it (--load-snapshot)
simulation::snapshot::start();
if (Global.test.enabled)
{
// the test runs as fast as it can compute, in steps of fixed length, so that runs on different machines agree