From: Martin Taibr Date: Sat, 13 Apr 2019 20:13:38 +0000 (+0200) Subject: make dm great again X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmartin-t%2Funfuck-dm;p=xonotic%2Fxonotic-data.pk3dir.git make dm great again and noobs rq --- diff --git a/qcsrc/common/gamemodes/gamemode/deathmatch/sv_deathmatch.qc b/qcsrc/common/gamemodes/gamemode/deathmatch/sv_deathmatch.qc index e622a1942..362d10a2c 100644 --- a/qcsrc/common/gamemodes/gamemode/deathmatch/sv_deathmatch.qc +++ b/qcsrc/common/gamemodes/gamemode/deathmatch/sv_deathmatch.qc @@ -5,3 +5,18 @@ MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining) // announce remaining frags return true; } + +// broken: +// -2 points for suicide +// ends at 30 score, not kills +// but who cares + +MUTATOR_HOOKFUNCTION(dm, PlayerDies) +{ + entity frag_attacker = M_ARGV(1, entity); + entity frag_target = M_ARGV(2, entity); + + if (frag_target != frag_attacker) { + GameRules_scoring_add(frag_target, SCORE, -1); + } +}