From 731c3cfe3eae26306c1c5c8cc728e61b9ef1c94f Mon Sep 17 00:00:00 2001 From: mand1nga Date: Wed, 10 Jun 2009 22:40:10 +0000 Subject: [PATCH] More fixes for bot command moveto git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6968 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/bots.qc | 3 --- data/qcsrc/server/havocbot.qc | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/qcsrc/server/bots.qc b/data/qcsrc/server/bots.qc index 70cd2f8fd..f6f49f94c 100644 --- a/data/qcsrc/server/bots.qc +++ b/data/qcsrc/server/bots.qc @@ -1416,9 +1416,6 @@ void navigation_pushroute(entity e) void navigation_poproute() { //print("bot ", etos(self), " pop\n"); - if(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL && self.goalcurrent.owner==self) - remove(self.goalcurrent); - self.goalcurrent = self.goalstack01; self.goalstack01 = self.goalstack02; self.goalstack02 = self.goalstack03; diff --git a/data/qcsrc/server/havocbot.qc b/data/qcsrc/server/havocbot.qc index 719c8d4c4..d16e53810 100644 --- a/data/qcsrc/server/havocbot.qc +++ b/data/qcsrc/server/havocbot.qc @@ -1134,6 +1134,7 @@ float havocbot_moveto(vector pos) if(self.havocbot_personal_waypoint==world) { dprint("Error: ", self.netname, " trying to walk to a non existent personal waypoint\n"); + self.aistatus &~= AI_STATUS_WAYPOINT_PERSONAL_GOING; return CMD_STATUS_ERROR; } @@ -1151,6 +1152,7 @@ float havocbot_moveto(vector pos) else { dprint("Warning: can't walk to the personal waypoint located at ", vtos(wp.origin),"\n"); + self.aistatus &~= AI_STATUS_WAYPOINT_PERSONAL_GOING; return CMD_STATUS_ERROR; } @@ -1174,6 +1176,7 @@ float havocbot_moveto(vector pos) { // Step 5: Waypoint reached dprint(self.netname, "'s personal waypoint reached\n"); + remove(self.havocbot_personal_waypoint); self.aistatus &~= AI_STATUS_WAYPOINT_PERSONAL_REACHED; return CMD_STATUS_FINISHED; } @@ -1200,6 +1203,7 @@ float havocbot_moveto(vector pos) if(!self.navigation_hasgoals) { dprint("Warning: can't walk to the personal waypoint located at ", vtos(wp.origin),"\n"); + self.aistatus &~= AI_STATUS_WAYPOINT_PERSONAL_LINKING; remove(wp); return CMD_STATUS_ERROR; } -- 2.39.2