This commit is contained in:
Rachael Alexanderson 2017-12-25 05:57:43 -05:00
commit c012e7fe9e
8 changed files with 12 additions and 7 deletions

View file

@ -1772,7 +1772,7 @@ void G_DoReborn (int playernum, bool freshbot)
}
// spawn at random spot if in deathmatch
if (deathmatch || isUnfriendly)
if ((deathmatch || isUnfriendly) && (level.deathmatchstarts.Size () > 0))
{
G_DeathMatchSpawnPlayer (playernum);
return;

View file

@ -60,6 +60,7 @@
// ---------------------------------------------------------------------------
CVAR (Bool, i_soundinbackground, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
EXTERN_CVAR(Int, vid_defwidth )
EXTERN_CVAR(Int, vid_defheight)
EXTERN_CVAR(Bool, vid_vsync )
@ -323,7 +324,7 @@ ApplicationController* appCtrl;
{
ZD_UNUSED(aNotification);
S_SetSoundPaused(0);
S_SetSoundPaused((!!i_soundinbackground) || 0);
}

View file

@ -62,6 +62,7 @@ extern int paused;
CVAR (Bool, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, m_filter, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, i_soundinbackground, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
EXTERN_CVAR (Bool, fullscreen)
@ -312,7 +313,7 @@ void MessagePump (const SDL_Event &sev)
{
case SDL_WINDOWEVENT_FOCUS_GAINED:
case SDL_WINDOWEVENT_FOCUS_LOST:
S_SetSoundPaused(sev.window.event == SDL_WINDOWEVENT_FOCUS_GAINED);
S_SetSoundPaused((!!i_soundinbackground) || sev.window.event == SDL_WINDOWEVENT_FOCUS_GAINED);
break;
}
break;

View file

@ -160,6 +160,7 @@ BOOL AppActive = TRUE;
int SessionState = 0;
int BlockMouseMove;
CVAR (Bool, i_soundinbackground, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, k_allowfullscreentoggle, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Bool, norawinput, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
@ -551,7 +552,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
SetPriorityClass (GetCurrentProcess (), IDLE_PRIORITY_CLASS);
}
S_SetSoundPaused (wParam);
S_SetSoundPaused ((!!i_soundinbackground) || wParam);
break;
case WM_WTSSESSION_CHANGE:

View file

@ -1130,7 +1130,7 @@ void Win32GLFrameBuffer::InitializeState()
bool Win32GLFrameBuffer::CanUpdate()
{
if (!AppActive) return false;
if (!AppActive && IsFullscreen()) return false;
return true;
}

View file

@ -2129,6 +2129,7 @@ SNDMNU_SFXVOLUME = "Sounds volume";
SNDMNU_MENUVOLUME = "Menu volume";
SNDMNU_MUSICVOLUME = "Music volume";
SNDMNU_MIDIDEVICE = "MIDI device";
SNDMNU_BACKGROUND = "Sound in Background";
SNDMNU_UNDERWATERREVERB = "Underwater reverb";
SNDMNU_RANDOMIZEPITCHES = "Randomize pitches";
SNDMNU_CHANNELS = "Sound channels";

View file

@ -1616,6 +1616,8 @@ OptionMenu SoundOptions protected
Option "$SNDMNU_RANDOMIZEPITCHES", "snd_pitched", "OnOff"
Slider "$SNDMNU_CHANNELS", "snd_channels", 64, 256, 8, 0
StaticText " "
Option "$SNDMNU_BACKGROUND", "i_soundinbackground", "OnOff"
StaticText " "
ifoption(openal)
{

View file

@ -417,8 +417,7 @@ class Thinker : Object native play
static clearscope int Tics2Seconds(int tics)
{
// This compensates for one tic being slightly less than 1/35 of a second.
return int(tics * (0.98 / TICRATE));
return int(tics / TICRATE);
}
}