From: Mario Date: Sun, 29 Jan 2017 07:44:56 +0000 (+1000) Subject: Fix players potentially picking up a second flag X-Git-Tag: xonotic-v0.8.2~263 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b04e6cf0eec54a9bf55f168b4f1081b08b2f6647;p=xonotic%2Fxonotic-data.pk3dir.git Fix players potentially picking up a second flag --- diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index c88639085..1e4190be6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -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) {