]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix for glowing invisible models showing up (artifact items staying visible after...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Sep 2002 05:29:09 +0000 (05:29 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Sep 2002 05:29:09 +0000 (05:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2397 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index f873dfe03edc63515776278776fb92a898a581e5..17f5f5007bb78b5b9c78f41c8d4dd474ea191485 100644 (file)
--- 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;