#ifdef IMPLEMENTATION
-#include "../../../deathtypes/all.qh"
-#include "../../../../server/round_handler.qh"
+#include <common/deathtypes/all.qh>
+#include <server/round_handler.qh>
REGISTER_MUTATOR(rm, cvar("g_instagib"));
// we do it this way, so rm can be toggled during the match
if(!autocvar_g_rm) { return false; }
+ entity frag_attacker = M_ARGV(1, entity);
+ entity frag_target = M_ARGV(2, entity);
+ float frag_deathtype = M_ARGV(3, float);
+ float frag_damage = M_ARGV(4, float);
+
if(DEATH_ISWEAPON(frag_deathtype, WEP_DEVASTATOR))
if(frag_attacker == frag_target || frag_target.classname == "nade")
frag_damage = 0;
if(frag_attacker == frag_target || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
frag_damage = 0;
+ M_ARGV(4, float) = frag_damage;
+
return false;
}
// we do it this way, so rm can be toggled during the match
if(!autocvar_g_rm) { return false; }
+ float frag_deathtype = M_ARGV(3, float);
+
if(DEATH_ISWEAPON(frag_deathtype, WEP_DEVASTATOR) || DEATH_ISWEAPON(frag_deathtype, WEP_ELECTRO))
- frag_damage = 1000; // always gib if it was a vaporizer death
+ M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
return false;
}