Adds check so we only do the pausing of the audio/sim when opening the pause menu when it's single player

This commit is contained in:
Areloch 2020-10-25 14:40:32 -05:00
parent db6c63d424
commit d83fc0b232

View file

@ -7,9 +7,13 @@ function PauseMenuList::onAdd(%this)
function PauseMenu::onWake(%this)
{
$timescale = 0;
if($Server::ServerType $= "SinglePlayer")
{
$timescale = 0;
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ 0 ] );
}
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ 0 ] );
PauseMenuList.hidden = false;
PauseMenuList.setFirstResponder();
PauseButtonHolder.setActive();
@ -18,8 +22,11 @@ function PauseMenu::onWake(%this)
function PauseMenu::onSleep(%this)
{
$timescale = 1;
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
if($Server::ServerType $= "SinglePlayer")
{
$timescale = 1;
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
}
}
function PauseMenu::onReturnTo(%this)