1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #7544: Freeze when starting headless server with no arguments

Fixes #7313: Loading an invalid path with openrct2 produces results different than expected

Do not load title sequences in headless mode and prevent use of null audio mixer when ride music is stopped.
This commit is contained in:
Ted John
2018-05-20 02:21:44 +01:00
parent 72b66c6c9d
commit 46300f216f
4 changed files with 21 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
- Fix: [#6141] CSS50.dat is never loaded.
- Fix: [#7176] Mechanics sometimes fall down from rides.
- Fix: [#7303] Visual glitch with virtual floor near map edges.
- Fix: [#7313] Loading an invalid path with openrct2 produces results different than expected.
- Fix: [#7327] Abstract scenery and stations don't get fully See-Through when hiding them (original bug).
- Fix: [#7331] Invention list in scenario editor crashes upon removing previously-enabled ride/stall entries.
- Fix: [#7341] Staff may auto-spawn on guests walking outside of paths.
@@ -29,6 +30,7 @@
- Fix: [#7436] Only the first 32 vehicles of a train can be painted.
- Fix: [#7480] Graphs skip values of 0.
- Fix: [#7528] In park entrance pricing tab, switching tabs happens on mouse-down instead of mouse-up
- Fix: [#7544] Starting a headless server with no arguments causes the game to freeze.
- Improved: [#2989] Multiplayer window now changes title when tab changes.
- Improved: [#5339] Change eyedropper icon to actual eyedropper and change cursor to crosshair.
- Improved: [#7302] Raising land near the map edge makes the affected area smaller instead of showing an 'off edge map' error.

View File

@@ -657,9 +657,20 @@ namespace OpenRCT2
void Launch()
{
gIntroState = INTRO_STATE_NONE;
if ((gOpenRCT2StartupAction == STARTUP_ACTION_TITLE) && gConfigGeneral.play_intro)
if (gOpenRCT2Headless)
{
gOpenRCT2StartupAction = STARTUP_ACTION_INTRO;
// NONE or OPEN are the only allowed actions for headless mode
if (gOpenRCT2StartupAction != STARTUP_ACTION_OPEN)
{
gOpenRCT2StartupAction = STARTUP_ACTION_NONE;
}
}
else
{
if ((gOpenRCT2StartupAction == STARTUP_ACTION_TITLE) && gConfigGeneral.play_intro)
{
gOpenRCT2StartupAction = STARTUP_ACTION_INTRO;
}
}
switch (gOpenRCT2StartupAction) {

View File

@@ -24,6 +24,7 @@
enum STARTUP_ACTION
{
STARTUP_ACTION_NONE,
STARTUP_ACTION_INTRO,
STARTUP_ACTION_TITLE,
STARTUP_ACTION_OPEN,

View File

@@ -74,7 +74,11 @@ void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, doubl
void Mixer_Stop_Channel(void * channel)
{
GetMixer()->Stop(static_cast<IAudioChannel*>(channel));
auto mixer = GetMixer();
if (mixer != nullptr)
{
mixer->Stop(static_cast<IAudioChannel*>(channel));
}
}
void Mixer_Channel_Volume(void * channel, sint32 volume)