From 2c253d663591ea9d6a4080080d849230fa0bdd0c Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 22 Nov 2013 01:54:26 +0000 Subject: [PATCH] fix some bugs... git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4530 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/snd_dma.c | 12 ++++++++++-- engine/common/translate.c | 2 +- engine/server/pr_cmds.c | 2 -- engine/server/sv_ents.c | 2 +- engine/server/sv_send.c | 4 ++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index f0db9e87c..bb76f8eea 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -409,7 +409,9 @@ static dllfunction_t qspeexdspfuncs[] = }; #endif -snd_capture_driver_t OPENAL_Capture; +#ifdef AVAIL_OPENAL +extern snd_capture_driver_t OPENAL_Capture; +#endif snd_capture_driver_t DSOUND_Capture; snd_capture_driver_t OSS_Capture; @@ -417,7 +419,9 @@ snd_capture_driver_t *capturedrivers[] = { &DSOUND_Capture, &OSS_Capture, +#ifdef AVAIL_OPENAL &OPENAL_Capture, +#endif NULL }; @@ -1472,7 +1476,9 @@ void S_DefaultSpeakerConfiguration(soundcardinfo_t *sc) sounddriver_t DSOUND_Output; -sounddriver_t OPENAL_Output; +#ifdef AVAIL_OPENAL +extern sounddriver_t OPENAL_Output; +#endif sounddriver pALSA_InitCard; sounddriver pSNDIO_InitCard; @@ -1489,7 +1495,9 @@ extern sounddriver pPPAPI_InitCard; //in order of preference sounddriver_t *outputdrivers[] = { +#ifdef AVAIL_OPENAL &OPENAL_Output, +#endif &DSOUND_Output, NULL }; diff --git a/engine/common/translate.c b/engine/common/translate.c index 467056211..943939c1d 100644 --- a/engine/common/translate.c +++ b/engine/common/translate.c @@ -1017,7 +1017,7 @@ struct po_s *PO_Load(vfsfile_t *file) break; } -// if (*msgid && start) + if (*msgid && start) PO_AddText(po, msgid, msgstr); } else diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 83a3d82fb..96d14fb94 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -1979,8 +1979,6 @@ qbyte *PR_OpenFile(char *filename, qbyte *buffer) return svprogfuncs->filefromprogs(svprogfuncs, prnumforfile, filename, NULL, buffer); } -char *Translate(char *message); - //#define RETURN_EDICT(pf, e) (((int *)pr_globals)[OFS_RETURN] = EDICT_TO_PROG(pf, e)) diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index 7d8969a56..d8dead1c1 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -2026,7 +2026,7 @@ void SV_WritePlayersToMVD (client_t *client, client_frame_t *frame, sizebuf_t *m #define DF_GIB (1<<9) demo_frame = &demo.frames[demo.parsecount&DEMO_FRAMES_MASK]; - for (j=0,cl=svs.clients, dcl = demo_frame->clients; jclients; j < svs.allocated_client_slots ; j++,cl++, dcl++) { if (cl->state != cs_spawned) continue; diff --git a/engine/server/sv_send.c b/engine/server/sv_send.c index f4a339296..0fb63a033 100644 --- a/engine/server/sv_send.c +++ b/engine/server/sv_send.c @@ -2559,7 +2559,7 @@ void SV_SendMVDMessage(void) if (sv.time - demo.time < 1.0/min_fps) return; - for (i=0, c = svs.clients ; istate != cs_spawned) continue; // datagrams only go to spawned @@ -2586,7 +2586,7 @@ void SV_SendMVDMessage(void) if (demo.recorder.fteprotocolextensions & (PEXT_HEXEN2|PEXT_CSQC)) m = MAX_CL_STATS; - for (i=0, c = svs.clients ; istate != cs_spawned) continue; // datagrams only go to spawned