]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix players potentially picking up a second flag
authorMario <mario@smbclan.net>
Sun, 29 Jan 2017 07:44:56 +0000 (17:44 +1000)
committerMario <mario@smbclan.net>
Sun, 29 Jan 2017 07:44:56 +0000 (17:44 +1000)
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index c88639085ec5a47434fe372af8944634d2484e90..1e4190be66798b47164b3ee43029b6c2de8ef5a5 100644 (file)
@@ -1129,7 +1129,7 @@ METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher))
                                        else if(is_not_monster && (!toucher.flagcarried))
                                                ctf_Handle_Pickup(flag, toucher, PICKUP_DROPPED);
                                }
-                               else
+                               else if(!toucher.flagcarried)
                                        ctf_Handle_Retrieve(flag, toucher);
                        }
                        break;
@@ -2221,7 +2221,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerUseKey)
                                                        player.throw_antispam = time + autocvar_g_ctf_pass_wait;
                                                        return true;
                                                }
-                                               else if(player.flagcarried)
+                                               else if(player.flagcarried && !head.flagcarried)
                                                {
                                                        if(closest_target)
                                                        {