]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/csqcmodel_hooks.qc
fix accelerometer with csqcmodels
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / csqcmodel_hooks.qc
index 7204981bd4f3ee8d83806688af7c04fe97b3c74c..a0a6e150e373dee3a051e175a75e8842cd4a4618 100644 (file)
@@ -207,8 +207,6 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
 .float csqcmodel_saveframe4;
 .float csqcmodel_framecount;
 
-.float csqcmodel_isdead; // for utility code
-
 #define IS_DEAD_FRAME(f) ((f) == 0 || (f) == 1)
 void CSQCPlayer_FallbackFrame_PreUpdate(void)
 {
@@ -465,8 +463,9 @@ void CSQCPlayer_GlowMod_Apply(void)
                {
                        self.glowmod = self.glowmod * bound(0, 1 - (time - self.death_time) / autocvar_cl_deathglow, 1);
                        // prevent the zero vector
-                       if(self.glowmod_x == 0)
-                               self.glowmod_x = -1;
+                       self.glowmod_x = max(self.glowmod_x, 0.0001);
+                       self.glowmod_y = max(self.glowmod_y, 0.0001);
+                       self.glowmod_z = max(self.glowmod_z, 0.0001);
                }
 }