From fd5c62136c1abc84478f41b480dbed10913bba61 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 20 Sep 2002 05:29:09 +0000 Subject: [PATCH] fix for glowing invisible models showing up (artifact items staying visible after pickup in darkplaces mod - the glow still stays though) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2397 d7cf8633-e32d-0410-b094-e92efae38249 --- sv_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sv_main.c b/sv_main.c index f873dfe0..17f5f500 100644 --- a/sv_main.c +++ b/sv_main.c @@ -863,7 +863,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) #else void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) { - int e, clentnum, flags, alpha, glowcolor, glowsize, scale, effects; + int e, clentnum, flags, alpha, glowcolor, glowsize, scale, effects, modelindex; int culled_pvs, culled_portal, culled_trace, visibleentities, totalentities; float alphaf, lightsize; qbyte *pvs; @@ -966,8 +966,10 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) lightsize = max(lightsize, 100); } + modelindex = 0; if (ent->v.modelindex >= 0 && ent->v.modelindex < MAX_MODELS && pr_strings[ent->v.model]) { + modelindex = ent->v.modelindex; model = sv.models[(int)ent->v.modelindex]; Mod_CheckLoaded(model); } @@ -1137,7 +1139,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) s->colormap = ent->v.colormap; s->skin = ent->v.skin; s->frame = ent->v.frame; - s->modelindex = ent->v.modelindex; + s->modelindex = modelindex; s->effects = effects; s->alpha = alpha; s->scale = scale; -- 2.39.2