From 75adb82c845a486aafb6b65a23ff31ff8fde39cc Mon Sep 17 00:00:00 2001 From: mand1nga Date: Thu, 18 Aug 2011 18:20:08 -0300 Subject: [PATCH] Hack: do not use players as goals --- qcsrc/server/bot/havocbot/roles.qc | 4 ++++ qcsrc/server/bot/navigation.qc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index 4cf685ddb..93a683a93 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -199,6 +199,10 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi continue; } + // TODO: rate waypoints near the targetted player at that moment, instead of the player itself + // adding a player as a goal seems to be quite dangerous, especially on space maps + // remove hack in navigation_poptouchedgoals() after performing this change + t = (self.health + self.armorvalue ) / (head.health + head.armorvalue ); navigation_routerating(head, t * ratingscale, 2000); } diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc index 968e760b8..de4019d99 100644 --- a/qcsrc/server/bot/navigation.qc +++ b/qcsrc/server/bot/navigation.qc @@ -907,6 +907,10 @@ void navigation_poptouchedgoals() // personality property } + // HACK: remove players/bots as goals, they can lead a bot to unexpected places (cliffs, lava, etc) + // TODO: rate waypoints near the targetted player at that moment, instead of the player itself + if(self.goalcurrent.classname=="player") + navigation_poproute(); // Loose goal touching check when running if(self.aistatus & AI_STATUS_RUNNING) -- 2.39.2