From: divverent Date: Tue, 22 Jan 2008 14:53:58 +0000 (+0000) Subject: make play/play2 dummies when -nosound X-Git-Tag: xonotic-v0.1.0preview~2521 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc4bb4f9a36d6715c60d1c165f9ac86af1e714a8;p=xonotic%2Fdarkplaces.git make play/play2 dummies when -nosound git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7988 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host_cmd.c b/host_cmd.c index cb83f337..011cea07 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -2522,3 +2522,6 @@ void Host_InitCommands (void) Cvar_RegisterVariable(&sv_adminnick); } +void Host_NoOperation_f(void) +{ +} diff --git a/quakedef.h b/quakedef.h index bb9bb840..87643cad 100644 --- a/quakedef.h +++ b/quakedef.h @@ -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); diff --git a/snd_main.c b/snd_main.c index 4f7ca310..03b1358d 100644 --- a/snd_main.c +++ b/snd_main.c @@ -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);