]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Take score instead of giving it if teamkilling FC
authorMario <mario@smbclan.net>
Tue, 22 Dec 2015 06:05:13 +0000 (16:05 +1000)
committerMario <mario@smbclan.net>
Tue, 22 Dec 2015 06:05:13 +0000 (16:05 +1000)
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index 699f1034caf0492a1646cd7acd375202736a460e..d4524479d167dec53dc1d9dd363290390a46bf16 100644 (file)
@@ -2250,7 +2250,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerDies)
 {
        if((frag_attacker != frag_target) && (IS_PLAYER(frag_attacker)) && (frag_target.flagcarried))
        {
-               PlayerTeamScore_AddScore(frag_attacker, autocvar_g_ctf_score_kill);
+               PlayerTeamScore_AddScore(frag_attacker, ((SAME_TEAM(frag_attacker, frag_target)) ? -autocvar_g_ctf_score_kill : autocvar_g_ctf_score_kill));
                PlayerScore_Add(frag_attacker, SP_CTF_FCKILLS, 1);
        }