From: Samual Date: Sun, 1 Apr 2012 00:33:32 +0000 (-0400) Subject: Make bots automatically pass you the flag if you send them a request (so if you ... X-Git-Tag: xonotic-v0.7.0~240^2~131 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=564c38fcd75e17a3d57ff94cd5eab924bd0b633c;p=xonotic%2Fxonotic-data.pk3dir.git Make bots automatically pass you the flag if you send them a request (so if you +use while next to a bot flagcarrier on your team, they will throw you the flag instantly) --- diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 6b731955b..7345766f9 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -977,8 +977,16 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) { if(autocvar_g_ctf_pass_request && !player.flagcarried && head.flagcarried) { - centerprint(head, strcat(player.netname, " requests you to pass the ", head.flagcarried.netname)); - centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); + if(clienttype(head) == CLIENTTYPE_BOT) + { + centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); + ctf_Handle_Throw(head, player, DROPTYPE_PASS); + } + else + { + centerprint(head, strcat(player.netname, " requests you to pass the ", head.flagcarried.netname)); + centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); + } player.throw_antispam = time + autocvar_g_ctf_pass_wait; return 0; }