]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/race/sv_race.qc
Add a parameter to the PlayerDamaged mutator hook to forbid logging damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / race / sv_race.qc
index ecfd3660588cf91275a71f079d9994aa1bf1ab0f..2709a3cc9311e5f604c8055ca8fe8963919993f6 100644 (file)
@@ -285,6 +285,13 @@ MUTATOR_HOOKFUNCTION(rc, PutClientInServer)
        }
 }
 
+MUTATOR_HOOKFUNCTION(rc, PlayerDamaged)
+{
+       int frag_deathtype = M_ARGV(5, int);
+       if (frag_deathtype == DEATH_KILL.m_id)
+               M_ARGV(0, bool) = true; // forbid_damage_logging
+}
+
 MUTATOR_HOOKFUNCTION(rc, PlayerDies)
 {
        entity frag_target = M_ARGV(2, entity);