]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
cvar: csqc_usedemoprogs
[xonotic/darkplaces.git] / cl_main.c
index ab7ec1b3c6cddc665071e858b2d95a71b72d2faf..c6d9319d168c840a388670d41baa96f4e354e170 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 cvar_t csqc_progname = {0, "csqc_progname","csprogs.dat","name of csprogs.dat file to load"};
 cvar_t csqc_progcrc = {CVAR_READONLY, "csqc_progcrc","-1","CRC of csprogs.dat file to load (-1 is none), only used during level changes and then reset to -1"};
 cvar_t csqc_progsize = {CVAR_READONLY, "csqc_progsize","-1","file size of csprogs.dat file to load (-1 is none), only used during level changes and then reset to -1"};
+cvar_t csqc_usedemoprogs = {0, "csqc_usedemoprogs","1","use csprogs stored in demos"};
 
 cvar_t cl_shownet = {0, "cl_shownet","0","1 = print packet size, 2 = print packet message list"};
 cvar_t cl_nolerp = {0, "cl_nolerp", "0","network update smoothing"};
@@ -1261,6 +1262,8 @@ void CL_UpdateNetworkEntityTrail(entity_t *e)
        // do trails
        if (e->render.flags & RENDER_GLOWTRAIL)
                trailtype = EFFECT_TR_GLOWTRAIL;
+       if (e->state_current.traileffectnum)
+               trailtype = (effectnameindex_t)e->state_current.traileffectnum;
        // check if a trail is allowed (it is not after a teleport for example)
        if (trailtype && e->persistent.trail_allowed)
        {
@@ -1558,6 +1561,8 @@ void CL_LinkNetworkEntity(entity_t *e)
        // do trail light
        if (e->render.flags & RENDER_GLOWTRAIL)
                trailtype = EFFECT_TR_GLOWTRAIL;
+       if (e->state_current.traileffectnum)
+               trailtype = (effectnameindex_t)e->state_current.traileffectnum;
        if (trailtype)
                CL_ParticleTrail(trailtype, 1, origin, origin, vec3_origin, vec3_origin, NULL, e->state_current.glowcolor, true, false, NULL, NULL);