1 #include "../../common/deathtypes/all.qh"
2 #include "../round_handler.qh"
4 REGISTER_MUTATOR(rm, cvar("g_instagib"));
6 MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
8 // we do it this way, so rm can be toggled during the match
9 if(!autocvar_g_rm) { return false; }
11 if(DEATH_ISWEAPON(frag_deathtype, WEP_DEVASTATOR))
12 if(frag_attacker == frag_target || frag_target.classname == "nade")
15 if(autocvar_g_rm_laser)
16 if(DEATH_ISWEAPON(frag_deathtype, WEP_ELECTRO))
17 if(frag_attacker == frag_target || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
23 MUTATOR_HOOKFUNCTION(rm, PlayerDies)
25 // we do it this way, so rm can be toggled during the match
26 if(!autocvar_g_rm) { return false; }
28 if(DEATH_ISWEAPON(frag_deathtype, WEP_DEVASTATOR) || DEATH_ISWEAPON(frag_deathtype, WEP_ELECTRO))
29 frag_damage = 1000; // always gib if it was a vaporizer death