Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tturrets / units / unit_fusionreactor.qc
index 8118b8f..32e4a24 100644 (file)
@@ -38,15 +38,15 @@ float turret_fusionreactor_firecheck()
                return 0;
 
        if (self.ammo < self.shot_dmg)
-               return 0;
-
-       if (self.enemy.ammo >= self.enemy.ammo_max)
-               return 0;
+               return 0;       
        
        if (vlen(self.enemy.origin - self.origin) > self.target_range)
-               return 0;                               
+               return 0;       
+       
+       if (self.enemy.ammo >= self.enemy.ammo_max)
+               return 0;
        
-       if(self.team != self.enemy.team)
+       if(DIFF_TEAM(self, self.enemy))
                return 0;
        
        if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)