mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix rain continuing on main menu. Added comment about screen flags
This commit is contained in:
parent
83a7dd5095
commit
86b6d8083e
|
@ -104,6 +104,8 @@ typedef void (EMPTY_ARGS_VOID_POINTER)();
|
||||||
typedef unsigned short rct_string_id;
|
typedef unsigned short rct_string_id;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
// Although this is labeled a flag it actually means when
|
||||||
|
// zero the screen is in playing mode.
|
||||||
SCREEN_FLAGS_PLAYING = 0,
|
SCREEN_FLAGS_PLAYING = 0,
|
||||||
SCREEN_FLAGS_TITLE_DEMO = 1,
|
SCREEN_FLAGS_TITLE_DEMO = 1,
|
||||||
SCREEN_FLAGS_SCENARIO_EDITOR = 2,
|
SCREEN_FLAGS_SCENARIO_EDITOR = 2,
|
||||||
|
|
|
@ -103,6 +103,17 @@ void climate_reset(int climate)
|
||||||
|
|
||||||
_lightningTimer = 0;
|
_lightningTimer = 0;
|
||||||
_thunderTimer = 0;
|
_thunderTimer = 0;
|
||||||
|
if (_rainVolume != 1){
|
||||||
|
#ifdef USE_MIXER
|
||||||
|
if (_rainSoundChannel) {
|
||||||
|
Mixer_Stop_Channel(_rainSoundChannel);
|
||||||
|
_rainSoundChannel = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
sound_stop(&_rainSoundInstance);
|
||||||
|
#endif
|
||||||
|
_rainVolume = 1;
|
||||||
|
}
|
||||||
|
|
||||||
climate_determine_future_weather();
|
climate_determine_future_weather();
|
||||||
}
|
}
|
||||||
|
@ -229,7 +240,7 @@ void climate_update_sound()
|
||||||
return;
|
return;
|
||||||
if (!(RCT2_GLOBAL(0x009AF59D, uint8) & 1))
|
if (!(RCT2_GLOBAL(0x009AF59D, uint8) & 1))
|
||||||
return;
|
return;
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (1<<SCREEN_FLAGS_PLAYING))
|
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
climate_update_rain_sound();
|
climate_update_rain_sound();
|
||||||
|
|
Loading…
Reference in New Issue