Fix bots always returning to own base after that the stolen flag has been returned
authorterencehill <piuntn@gmail.com>
Fri, 16 Dec 2016 19:29:33 +0000 (20:29 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 16 Dec 2016 19:29:33 +0000 (20:29 +0100)
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index 4db9113..27fd46b 100644 (file)
@@ -1825,6 +1825,11 @@ void havocbot_role_ctf_retriever(entity this)
        mf = havocbot_ctf_find_flag(this);
        if(mf.ctf_status==FLAG_BASE)
        {
+               if(this.goalcurrent == mf)
+               {
+                       navigation_clearroute(this);
+                       this.bot_strategytime = 0;
+               }
                havocbot_ctf_reset_role(this);
                return;
        }