]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make dm great again martin-t/unfuck-dm
authorMartin Taibr <taibr.martin@gmail.com>
Sat, 13 Apr 2019 20:13:38 +0000 (22:13 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Sat, 13 Apr 2019 20:13:38 +0000 (22:13 +0200)
and noobs rq

qcsrc/common/gamemodes/gamemode/deathmatch/sv_deathmatch.qc

index e622a1942fbee46b6c792aae8abe47df0cad0c83..362d10a2c5a2b81a80a06966e8929feba892d763 100644 (file)
@@ -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);
+       }
+}