From 564c38fcd75e17a3d57ff94cd5eab924bd0b633c Mon Sep 17 00:00:00 2001 From: Samual Date: Sat, 31 Mar 2012 20:33:32 -0400 Subject: [PATCH] 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) --- qcsrc/server/mutators/gamemode_ctf.qc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; } -- 2.39.2