]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
optimized Mod_BuildBumpVectors slightly
[xonotic/darkplaces.git] / cl_main.c
index a1e7c95f75eeb3c50773fa6c0844dfa770db4fd8..1006559dc7d24c6ca513e3a05454e0a11969eaad 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -145,9 +145,9 @@ void CL_ClearState(void)
        // LordHavoc: have to set up the baseline info for alpha and other stuff
        for (i = 0;i < cl_max_entities;i++)
        {
-               ClearStateToDefault(&cl_entities[i].state_baseline);
-               ClearStateToDefault(&cl_entities[i].state_previous);
-               ClearStateToDefault(&cl_entities[i].state_current);
+               cl_entities[i].state_baseline = defaultstate;
+               cl_entities[i].state_previous = defaultstate;
+               cl_entities[i].state_current = defaultstate;
        }
 
        CL_CGVM_Clear();
@@ -837,9 +837,9 @@ void CL_LinkNetworkEntity(entity_t *e)
                if (e->state_previous.active && e->state_previous.modelindex == e->state_current.modelindex)
                {
                        if (e->render.flags & RENDER_GLOWTRAIL)
-                               CL_RocketTrail2(e->persistent.trail_origin, origin, e->state_current.glowcolor, e);
-                       else if (trailtype >= 0)
-                               CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e);
+                               trailtype = 9;
+                       if (trailtype >= 0)
+                               CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e->state_current.glowcolor, e);
                }
                VectorCopy(origin, e->persistent.trail_origin);
                // note: the cl.viewentity and intermission check is to hide player
@@ -904,7 +904,7 @@ static void CL_RelinkNetworkEntities(void)
 
        ent = &cl.viewent;
        ent->state_previous = ent->state_current;
-       ClearStateToDefault(&ent->state_current);
+       ent->state_current = defaultstate;
        ent->state_current.time = cl.time;
        ent->state_current.number = -1;
        ent->state_current.active = true;