]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make play/play2 dummies when -nosound
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jan 2008 14:53:58 +0000 (14:53 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jan 2008 14:53:58 +0000 (14:53 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7988 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c
quakedef.h
snd_main.c

index cb83f33721e7ea7a10e6de71af07516a446268d0..011cea07c1bf081164dff29e1c7e6250901ec822 100644 (file)
@@ -2522,3 +2522,6 @@ void Host_InitCommands (void)
        Cvar_RegisterVariable(&sv_adminnick);
 }
 
+void Host_NoOperation_f(void)
+{
+}
index bb9bb8406dec5de8e57c58ff106c4ab46f923fe8..87643cad3520a9dc5a38e2782957fb6c4011470b 100644 (file)
@@ -322,6 +322,7 @@ void Host_Quit_f(void);
 void Host_ClientCommands(const char *fmt, ...) DP_FUNC_PRINTF(1);
 void Host_ShutdownServer(void);
 void Host_Reconnect_f(void);
+void Host_NoOperation_f(void);
 
 void Host_AbortCurrentFrame(void);
 
index 4f7ca310813450a96a2e18d9bee6093c5ad75836..03b1358d161a79e2562dce42c4535b1cfecf5db3 100644 (file)
@@ -722,7 +722,12 @@ void S_Init(void)
 
 // COMMANDLINEOPTION: Sound: -nosound disables sound (including CD audio)
        if (COM_CheckParm("-nosound"))
+       {
+               // dummy out Play and Play2 because mods stuffcmd that
+               Cmd_AddCommand("play", Host_NoOperation_f, "does nothing because -nosound was specified");
+               Cmd_AddCommand("play2", Host_NoOperation_f, "does nothing because -nosound was specified");
                return;
+       }
 
        snd_mempool = Mem_AllocPool("sound", 0, NULL);