int autocvar_g_instagib_extralives;
float autocvar_g_instagib_speed_highspeed;
-#include "../../../../server/cl_client.qh"
+#include <server/cl_client.qh>
-#include "../../../items/all.qc"
+#include <common/items/all.qc>
REGISTER_MUTATOR(mutator_instagib, cvar("g_instagib") && !g_nexball);
if(!IS_PLAYER(self))
return; // not a player
- if(self.deadflag || gameover)
+ if(IS_DEAD(self) || gameover)
instagib_stop_countdown(self);
else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO) || (self.flags & FL_GODMODE))
instagib_stop_countdown(self);
MUTATOR_HOOKFUNCTION(mutator_instagib, MatchEnd)
{
- entity head;
- FOR_EACH_PLAYER(head)
- instagib_stop_countdown(head);
-
+ FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(instagib_stop_countdown(it)));
return false;
}
if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
frag_damage = 1000; // always gib if it was a vaporizer death
- return FALSE;
+ return false;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)