]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
Don't lerp nailgun and super nailgun. Trades smoothness for better muzzle flash
[xonotic/darkplaces.git] / gl_rmain.c
index 2bb72a67a0d4bfa985ca7ffd924ec2b3441fa302..a205c10ddec063b2a4a12160cc0bb5be39179d99 100644 (file)
@@ -204,6 +204,7 @@ cvar_t r_water_hideplayer = {CVAR_CLIENT | CVAR_SAVE, "r_water_hideplayer", "0",
 
 cvar_t r_lerpsprites = {CVAR_CLIENT | CVAR_SAVE, "r_lerpsprites", "0", "enables animation smoothing on sprites"};
 cvar_t r_lerpmodels = {CVAR_CLIENT | CVAR_SAVE, "r_lerpmodels", "1", "enables animation smoothing on models"};
+cvar_t r_nolerp_list = {CVAR_CLIENT | CVAR_SAVE, "r_nolerp_list", "progs/v_nail.mdl,progs/v_nail2.mdl,progs/flame.mdl,progs/flame2.mdl,progs/braztall.mdl,progs/brazshrt.mdl,progs/longtrch.mdl,progs/flame_pyre.mdl,progs/v_saw.mdl,progs/v_xfist.mdl,progs/h2stuff/newfire.mdl", "comma separated list of models that will not have their animations smoothed"};
 cvar_t r_lerplightstyles = {CVAR_CLIENT | CVAR_SAVE, "r_lerplightstyles", "0", "enable animation smoothing on flickering lights"};
 cvar_t r_waterscroll = {CVAR_CLIENT | CVAR_SAVE, "r_waterscroll", "1", "makes water scroll around, value controls how much"};
 
@@ -3420,6 +3421,7 @@ void GL_Main_Init(void)
 
        Cvar_RegisterVariable(&r_lerpsprites);
        Cvar_RegisterVariable(&r_lerpmodels);
+       Cvar_RegisterVariable(&r_nolerp_list);
        Cvar_RegisterVariable(&r_lerplightstyles);
        Cvar_RegisterVariable(&r_waterscroll);
        Cvar_RegisterVariable(&r_bloom);
@@ -9473,6 +9475,8 @@ static void R_DecalSystem_SplatEntity(entity_render_t *ent, const vec3_t worldor
                        surfaceindex = bih_surfaces[triangleindex];
                        surface = surfaces + surfaceindex;
                        texture = surface->texture;
+                       if (!texture)
+                               continue;
                        if (texture->currentmaterialflags & (MATERIALFLAG_BLENDED | MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_SKY | MATERIALFLAG_SHORTDEPTHRANGE | MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFRACTION))
                                continue;
                        if (texture->surfaceflags & Q3SURFACEFLAG_NOMARKS)
@@ -9491,6 +9495,8 @@ static void R_DecalSystem_SplatEntity(entity_render_t *ent, const vec3_t worldor
                                continue;
                        // skip transparent surfaces
                        texture = surface->texture;
+                       if (!texture)
+                               continue;
                        if (texture->currentmaterialflags & (MATERIALFLAG_BLENDED | MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_SKY | MATERIALFLAG_SHORTDEPTHRANGE | MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFRACTION))
                                continue;
                        if (texture->surfaceflags & Q3SURFACEFLAG_NOMARKS)