From: mand1nga Date: Thu, 18 Aug 2011 21:20:08 +0000 (-0300) Subject: Hack: do not use players as goals X-Git-Tag: xonotic-v0.5.0~36^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75adb82c845a486aafb6b65a23ff31ff8fde39cc;p=xonotic%2Fxonotic-data.pk3dir.git Hack: do not use players as goals --- 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)