]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Apply an optimization by terencehill
authorMario <zacjardine@y7mail.com>
Sat, 13 Dec 2014 05:33:25 +0000 (16:33 +1100)
committerMario <zacjardine@y7mail.com>
Sat, 13 Dec 2014 05:33:25 +0000 (16:33 +1100)
qcsrc/server/mutators/mutator_instagib.qc

index dc822e2749e8e879fb2dc6ddd4e3a547d6871092..252449cf897fa8eb08c6d24bef9447a09a2b0ae2 100644 (file)
@@ -28,14 +28,14 @@ void instagib_stop_countdown(entity e)
 }
 void instagib_ammocheck()
 {
-       if (!IS_PLAYER(self))
-               return; // not a player
-       if (time < self.instagib_nextthink)
+       if(time < self.instagib_nextthink)
                return;
+       if(!IS_PLAYER(self))
+               return; // not a player
 
-       if (self.deadflag || gameover)
+       if(self.deadflag || gameover)
                instagib_stop_countdown(self);
-       else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO))
+       else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO) || (self.flags & FL_GODMODE))
                instagib_stop_countdown(self);
        else
        {