]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/flac_weapon.qc
Simplify maths for most vlen cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / flac_weapon.qc
index d1b560bfb2ffbaa58b1274b5a796406cff52a9e0..f4bc70ccc1853acf8d2d381a2941c026e6e5ac61 100644 (file)
@@ -50,8 +50,8 @@ METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, .entity weaponen
 void turret_flac_projectile_think_explode()
 {
     SELFPARAM();
-    if (self.enemy != world)
-    if (vlen(self.origin - self.enemy.origin) < self.owner.shot_radius * 3)
+    if(self.enemy != world)
+    if(vdist(self.origin - self.enemy.origin, <, self.owner.shot_radius * 3))
         setorigin(self,self.enemy.origin + randomvec() * self.owner.shot_radius);
 
 #ifdef TURRET_DEBUG