From 1b9407b2c2d59f74008d4ab42d8fc06b26a6cca2 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 4 Jun 2005 12:40:12 +0000 Subject: [PATCH] cl_muzzleflash fix (rid#1214759) git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1073 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_parse.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 9505351d3..512d4f0e8 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -2616,7 +2616,7 @@ void CL_SetStat (int pnum, int stat, int value) CL_MuzzleFlash ============== */ -void CL_MuzzleFlash (void) +void CL_MuzzleFlash (int destsplit) { vec3_t fv, rv, uv; dlight_t *dl=NULL; @@ -2632,15 +2632,14 @@ void CL_MuzzleFlash (void) i = MSG_ReadShort (); //was it us? - if (i == cl.playernum[0]) - { - if (!cl_muzzleflash.value) - return; - } + if (!cl_muzzleflash.value) // remove all muzzleflashes + return; + + if (i-1 == cl.playernum[destsplit] && cl_muzzleflash.value == 2) + return; pack = &cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities; - for (pnum=0 ; pnumnum_entities ; pnum++) //try looking for an entity with that id first { s1 = &pack->entities[pnum]; @@ -2657,7 +2656,7 @@ void CL_MuzzleFlash (void) if ((unsigned)(i) <= MAX_CLIENTS && i > 0) { // don't draw our own muzzle flash in gl if flashblending - if (i-1 == cl.playernum[0] && r_flashblend.value && qrenderer == QR_OPENGL) + if (i-1 == cl.playernum[destsplit] && r_flashblend.value && qrenderer == QR_OPENGL) return; pl = &cl.frames[parsecountmod].playerstate[i-1]; @@ -3461,7 +3460,7 @@ void CL_ParseServerMessage (void) break; case svc_muzzleflash: - CL_MuzzleFlash (); + CL_MuzzleFlash (destsplit); break; case svc_updateuserinfo: