From e0f3c35414a5dfceb1cc3fe73e3be2e6e769df06 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 28 May 2022 17:58:27 +0000 Subject: [PATCH] Improve robustness with weird build configs. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6239 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_plugin.inc | 2 ++ engine/client/snd_dma.c | 2 +- plugins/quake3/q3common.c | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_plugin.inc b/engine/client/cl_plugin.inc index 1ebd3378c..1bddf7101 100644 --- a/engine/client/cl_plugin.inc +++ b/engine/client/cl_plugin.inc @@ -374,6 +374,7 @@ static void QDECL Plug_Draw_RedrawScreen(void) SCR_UpdateScreen(); } +#ifdef HAVE_MEDIA_DECODER static void QDECL Plug_Media_SetState(cin_t *cin, int state) { Media_SetState(cin, state); @@ -382,6 +383,7 @@ static int QDECL Plug_Media_GetState(cin_t *cin) { return Media_GetState(cin); } +#endif static qhandle_t Plug_Scene_ModelToId(model_t *mod) { diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index 812552859..85c186a0e 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -3682,7 +3682,7 @@ static void S_Q2_AddEntitySounds(soundcardinfo_t *sc) else #endif #ifdef VM_CG - if (cls.protocol == CP_QUAKE3) + if (cls.protocol == CP_QUAKE3 && q3) count = q3->cg.GatherLoopingSounds(positions, entnums, sounds, countof(sounds)); else #endif diff --git a/plugins/quake3/q3common.c b/plugins/quake3/q3common.c index fb0433c37..f077989be 100644 --- a/plugins/quake3/q3common.c +++ b/plugins/quake3/q3common.c @@ -1749,5 +1749,10 @@ qboolean Plug_Init(void) UI_Init(); return true; } - +#else +qboolean Plug_Init(void) +{ + Con_Printf("Quake3 plugin without any support...\n"); + return false; +} #endif