mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 06:33:49 +00:00
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:
parent
db6c63d424
commit
d83fc0b232
1 changed files with 11 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue