From: Mario Date: Sat, 13 Dec 2014 05:33:25 +0000 (+1100) Subject: Apply an optimization by terencehill X-Git-Tag: xonotic-v0.8.0~114 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c5c4da70ec31a1ce28a116ccb6ddd1e4bfa20217;p=xonotic%2Fxonotic-data.pk3dir.git Apply an optimization by terencehill --- diff --git a/qcsrc/server/mutators/mutator_instagib.qc b/qcsrc/server/mutators/mutator_instagib.qc index dc822e274..252449cf8 100644 --- a/qcsrc/server/mutators/mutator_instagib.qc +++ b/qcsrc/server/mutators/mutator_instagib.qc @@ -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 {