mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +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
|
|
@ -6,10 +6,14 @@ function PauseMenuList::onAdd(%this)
|
||||||
}
|
}
|
||||||
|
|
||||||
function PauseMenu::onWake(%this)
|
function PauseMenu::onWake(%this)
|
||||||
|
{
|
||||||
|
if($Server::ServerType $= "SinglePlayer")
|
||||||
{
|
{
|
||||||
$timescale = 0;
|
$timescale = 0;
|
||||||
|
|
||||||
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ 0 ] );
|
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ 0 ] );
|
||||||
|
}
|
||||||
|
|
||||||
PauseMenuList.hidden = false;
|
PauseMenuList.hidden = false;
|
||||||
PauseMenuList.setFirstResponder();
|
PauseMenuList.setFirstResponder();
|
||||||
PauseButtonHolder.setActive();
|
PauseButtonHolder.setActive();
|
||||||
|
|
@ -17,10 +21,13 @@ function PauseMenu::onWake(%this)
|
||||||
|
|
||||||
|
|
||||||
function PauseMenu::onSleep(%this)
|
function PauseMenu::onSleep(%this)
|
||||||
|
{
|
||||||
|
if($Server::ServerType $= "SinglePlayer")
|
||||||
{
|
{
|
||||||
$timescale = 1;
|
$timescale = 1;
|
||||||
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
|
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function PauseMenu::onReturnTo(%this)
|
function PauseMenu::onReturnTo(%this)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue