From cc4bb4f9a36d6715c60d1c165f9ac86af1e714a8 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 22 Jan 2008 14:53:58 +0000 Subject: [PATCH] make play/play2 dummies when -nosound git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7988 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 3 +++ quakedef.h | 1 + snd_main.c | 5 +++++ 3 files changed, 9 insertions(+) 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); -- 2.39.2