]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/rocketminsta/rocketminsta.qc
Fix some mistakes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / rocketminsta / rocketminsta.qc
index eee3fef02f4fec1f8add5d8467c691aae671f632..ca4356ce1954f6c8cf0e84cb558a0120100f968d 100644 (file)
@@ -9,6 +9,11 @@ MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
        // 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;
@@ -18,6 +23,8 @@ MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
        if(frag_attacker == frag_target || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
                frag_damage = 0;
 
+       M_ARGV(4, float) = frag_damage;
+
        return false;
 }
 
@@ -26,8 +33,10 @@ MUTATOR_HOOKFUNCTION(rm, PlayerDies)
        // 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;
 }