]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a simple delay to prevent drawing projectiles in slowmo 0
authorMario <zacjardine@y7mail.com>
Fri, 5 Dec 2014 12:29:52 +0000 (23:29 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 5 Dec 2014 12:29:52 +0000 (23:29 +1100)
qcsrc/client/weapons/projectile.qc

index fc769408bdf584d785a0fa0f5dd1cdb0d71ed45e..0d2bce9439953fb5931e8ac3e5a1a03b57ab8ed8 100644 (file)
@@ -45,6 +45,7 @@ void Projectile_DrawTrail(vector to)
        }
 }
 
+.float proj_time;
 void Projectile_Draw()
 {
        vector rot;
@@ -53,6 +54,10 @@ void Projectile_Draw()
        float drawn;
        float t;
        float a;
+       float dt = time - self.proj_time;
+
+       self.proj_time = time;
+       if(dt <= 0) { return; }
 
        f = self.move_flags;
 
@@ -199,6 +204,7 @@ void Ent_Projectile()
        self.count = (f & 0x80);
        self.iflags = (self.iflags & IFLAG_INTERNALMASK) | IFLAG_AUTOANGLES | IFLAG_ANGLES | IFLAG_ORIGIN;
        self.solid = SOLID_TRIGGER;
+       self.proj_time = time;
        //self.effects = EF_NOMODELFLAGS;
 
        // this should make collisions with bmodels more exact, but it leads to