]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix CA scoring: it was added a point to the team for every kill
authorterencehill <piuntn@gmail.com>
Sun, 10 Feb 2013 19:42:03 +0000 (20:42 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 10 Feb 2013 19:42:03 +0000 (20:42 +0100)
qcsrc/server/mutators/gamemode_arena.qc
qcsrc/server/mutators/gamemode_ca.qc

index 4b88eefb2a760584883dda91a0cbf91beb261da4..6e4d8e39dcc47ae0ce9e93411a8e4b4056345d12 100644 (file)
@@ -230,7 +230,7 @@ MUTATOR_HOOKFUNCTION(arena_ForbidPlayerScore_Clear)
 MUTATOR_HOOKFUNCTION(arena_GiveFragsForKill)
 {
        if(arena_roundbased)
-               frag_score = 0;
+               frag_score = 0; // score will be given to the champion when the round ends
        return 1;
 }
 
index 5fffa160189d7595495f7102c2d33c3de0b57d78..291166fe7bf06c47cb662666386b7d5e4e85a2b0 100644 (file)
@@ -219,6 +219,12 @@ MUTATOR_HOOKFUNCTION(ca_ForbidThrowCurrentWeapon)
        return 1;
 }
 
+MUTATOR_HOOKFUNCTION(ca_GiveFragsForKill)
+{
+       frag_score = 0; // score will be given to the winner team when the round ends
+       return 1;
+}
+
 void ca_Initialize()
 {
        allowed_to_spawn = TRUE;
@@ -243,6 +249,7 @@ MUTATOR_DEFINITION(gamemode_ca)
        MUTATOR_HOOK(PlayerPreThink, ca_PlayerPreThink, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidPlayerScore_Clear, ca_ForbidPlayerScore_Clear, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidThrowCurrentWeapon, ca_ForbidThrowCurrentWeapon, CBC_ORDER_ANY);
+       MUTATOR_HOOK(GiveFragsForKill, ca_GiveFragsForKill, CBC_ORDER_FIRST);
 
        MUTATOR_ONADD
        {