From: Mario Date: Fri, 5 Dec 2014 12:29:52 +0000 (+1100) Subject: Add a simple delay to prevent drawing projectiles in slowmo 0 X-Git-Tag: xonotic-v0.8.0~122^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40f605df49a9f34d063608dc5e535f248e23da70;p=xonotic%2Fxonotic-data.pk3dir.git Add a simple delay to prevent drawing projectiles in slowmo 0 --- diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index fc769408b..0d2bce943 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -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