From 5c7b6b809fec8a8fcb197b9481f62f7557f56f1d Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 24 Dec 2004 09:10:39 +0000 Subject: [PATCH] minor fixes to get the non-merged version to build properly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@685 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 2 ++ engine/client/zqtp.c | 4 ++++ engine/common/common.c | 4 ++++ engine/common/gl_q2bsp.c | 2 ++ engine/server/sv_phys.c | 9 ++++++--- engine/sw/sw_draw.c | 2 +- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 3ee6ac2df..0f820718a 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -882,7 +882,9 @@ void CL_Disconnect (void) #endif SCR_EndLoadingPlaque(); +#ifdef Q2CLIENT cls.q2server = 0; +#endif } #undef serverrunning diff --git a/engine/client/zqtp.c b/engine/client/zqtp.c index ee3a2d226..809bf39ef 100644 --- a/engine/client/zqtp.c +++ b/engine/client/zqtp.c @@ -2606,7 +2606,11 @@ static void CL_Say (qboolean team, char *extra) return; } #endif +#ifdef Q2CLIENT MSG_WriteByte (&cls.netchan.message, cls.q2server?clcq2_stringcmd:clc_stringcmd); +#else + MSG_WriteByte (&cls.netchan.message, clc_stringcmd); +#endif SZ_Print (&cls.netchan.message, team ? "say_team " : "say "); if (sendtext[0] < 32) diff --git a/engine/common/common.c b/engine/common/common.c index c9b8d1fb4..874ed7e34 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -883,6 +883,7 @@ static int MSG_ReadRawBits(sizebuf_t *msg, int bits) return bitmask; } +#ifndef MINIMAL /* ============ MSG_ReadHuffBits @@ -907,6 +908,7 @@ static int MSG_ReadHuffBits(sizebuf_t *msg, int bits) return bitmask; } +#endif int MSG_ReadBits(int bits) { @@ -937,9 +939,11 @@ int MSG_ReadBits(int bits) case SZ_RAWBITS: bitmask = MSG_ReadRawBits(&net_message, bits); break; +#ifndef MINIMAL case SZ_HUFFMAN: bitmask = MSG_ReadHuffBits(&net_message, bits); break; +#endif } if (extend) diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index aca26857a..1fd32d226 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -3525,7 +3525,9 @@ void CM_InitBoxHull (void) box_model.funcs.FatPVS = Q2BSP_FatPVS; box_model.funcs.EdictInFatPVS = Q2BSP_EdictInFatPVS; box_model.funcs.FindTouchedLeafs_Q1 = Q2BSP_FindTouchedLeafs; +#ifndef SERVERONLY box_model.funcs.MarkLights = Q2BSP_MarkLights; +#endif box_model.funcs.LeafPVS = CM_LeafnumPVS; box_model.funcs.LeafForPoint = CM_ModelPointLeafnum; diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index 7b1682c2e..63ad9194a 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -331,9 +331,12 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) } else { - VectorSubtract(planes[0], trace.plane.normal, diff); - if (Length(diff) < 0.01) - continue; //hit this plane already + if (numplanes) + { + VectorSubtract(planes[0], trace.plane.normal, diff); + if (Length(diff) < 0.01) + continue; //hit this plane already + } VectorCopy (trace.plane.normal, planes[numplanes]); numplanes++; diff --git a/engine/sw/sw_draw.c b/engine/sw/sw_draw.c index 9fdde2141..9a3ecb3af 100644 --- a/engine/sw/sw_draw.c +++ b/engine/sw/sw_draw.c @@ -40,7 +40,7 @@ typedef struct { static rectdesc_t r_rectdesc; qbyte *draw_chars; // 8*8 graphic characters -//mpic_t *draw_disc; +mpic_t *draw_disc; mpic_t *draw_backtile; void SWDraw_TransPic (int x, int y, mpic_t *pic);