From 8df614ef191f89ae5da9786cb38aa0605636d9fd Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Sat, 13 Apr 2019 22:13:38 +0200 Subject: [PATCH] make dm great again and noobs rq --- .../gamemode/deathmatch/sv_deathmatch.qc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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); + } +} -- 2.39.2