]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: don't attack players who finished the race
authorterencehill <piuntn@gmail.com>
Thu, 5 May 2022 09:54:18 +0000 (11:54 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 5 May 2022 09:54:18 +0000 (11:54 +0200)
qcsrc/server/race.qc

index 4ecda0a9a09732b0411f164b1d4e3c175a729005..545bdad27be16a5595e74692fd9fa750cc3fad26 100644 (file)
@@ -502,6 +502,9 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                        {
                                CS(e).race_completed = 1;
                                MAKE_INDEPENDENT_PLAYER(e);
+                               if(e.bot_attack)
+                                       IL_REMOVE(g_bot_targets, e);
+                               e.bot_attack = false;
                                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_FINISHED, e.netname);
                                ClientData_Touch(e);
                        }