- fixed: -nosfx deactivated the entire sound system which also made music inoperable. Changed it so that all it does is block sound effects from being started.

SVN r2621 (trunk)
This commit is contained in:
Christoph Oelckers 2010-08-28 13:36:41 +00:00
parent 5647fed0cf
commit 1dd3ecd6e2
3 changed files with 5 additions and 2 deletions

View file

@ -827,7 +827,7 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
FVector3 pos, vel;
FRolloffInfo *rolloff;
if (sound_id <= 0 || volume <= 0)
if (sound_id <= 0 || volume <= 0 || nosfx)
return NULL;
int type;

View file

@ -81,6 +81,7 @@ CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, snd_pitched, false, CVAR_ARCHIVE)
SoundRenderer *GSnd;
bool nosfx;
void I_CloseSound ();
@ -234,7 +235,8 @@ public:
void I_InitSound ()
{
/* Get command line options: */
bool nosound = !!Args->CheckParm ("-nosfx") || !!Args->CheckParm ("-nosound");
bool nosound = !!Args->CheckParm ("-nosound");
nosfx = !!Args->CheckParm ("-nosfx");
if (nosound)
{

View file

@ -143,6 +143,7 @@ public:
};
extern SoundRenderer *GSnd;
extern bool nosfx;
void I_InitSound ();
void I_ShutdownSound ();