mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-25 21:01:20 +00:00
- make snd_speech toggle work in SW.
This commit is contained in:
parent
f78d9fb770
commit
8868be659f
3 changed files with 10 additions and 5 deletions
|
@ -112,10 +112,10 @@ CUSTOM_CVARD(Bool, snd_ambience, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_N
|
||||||
CVARD(Bool, snd_enabled, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disables sound effects")
|
CVARD(Bool, snd_enabled, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disables sound effects")
|
||||||
CVARD(Bool, snd_tryformats, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disables automatic discovery of replacement sounds and music in .flac and .ogg formats")
|
CVARD(Bool, snd_tryformats, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disables automatic discovery of replacement sounds and music in .flac and .ogg formats")
|
||||||
|
|
||||||
CVARD(Bool, mus_restartonload, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "restart the music when loading a saved game with the same map or not")
|
CVARD(Bool, mus_restartonload, false, CVAR_ARCHIVE, "restart the music when loading a saved game with the same map or not")
|
||||||
CVARD(Bool, mus_redbook, true, CVAR_ARCHIVE, "enables/disables redbook audio")
|
CVARD(Bool, mus_redbook, true, CVAR_ARCHIVE, "enables/disables redbook audio")
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, snd_speech, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disables player speech")
|
CUSTOM_CVARD(Int, snd_speech, 1, CVAR_ARCHIVE, "enables/disables player speech")
|
||||||
{
|
{
|
||||||
if (self < 0) self = 0;
|
if (self < 0) self = 0;
|
||||||
else if (self > 1) self = 1;
|
else if (self > 1) self = 1;
|
||||||
|
|
|
@ -35,8 +35,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
// !JIM! 09/20/95
|
// !JIM! 09/20/95
|
||||||
// NOTE: HIGHER priority numbers have the highest precedence in the play list.
|
// NOTE: HIGHER priority numbers have the highest precedence in the play list.
|
||||||
#define PRI_MAX 100
|
#define PRI_MAX 100
|
||||||
#define PRI_PLAYERDEATH 51
|
#define PRI_PLAYERDEATH 52
|
||||||
#define PRI_PLAYERVOICE 50
|
#define PRI_PLAYERVOICE 51
|
||||||
|
#define PRI_PLAYERSPEECH 50
|
||||||
#define PRI_HI_PLAYERWEAP 49
|
#define PRI_HI_PLAYERWEAP 49
|
||||||
#define PRI_LOW_PLAYERWEAP 48
|
#define PRI_LOW_PLAYERWEAP 48
|
||||||
#define PRI_PLAYERAMBIENT 40
|
#define PRI_PLAYERAMBIENT 40
|
||||||
|
|
|
@ -816,7 +816,11 @@ int _PlayerSound(int num, PLAYERp pp)
|
||||||
vp = &voc[num];
|
vp = &voc[num];
|
||||||
|
|
||||||
// Not a player voice, bail.
|
// Not a player voice, bail.
|
||||||
if (vp->priority != PRI_PLAYERVOICE && vp->priority != PRI_PLAYERDEATH)
|
if (vp->priority != PRI_PLAYERVOICE && vp->priority != PRI_PLAYERDEATH && vp->priority != PRI_PLAYERSPEECH)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// Don't talk if not allowed to.
|
||||||
|
if (vp->priority == PRI_PLAYERSPEECH && !snd_speech)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// The surfacing sound should not block other player speech.
|
// The surfacing sound should not block other player speech.
|
||||||
|
|
Loading…
Reference in a new issue