]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Better variable names
authormand1nga <mand1nga@xonotic.org>
Fri, 22 Apr 2011 00:14:48 +0000 (21:14 -0300)
committermand1nga <mand1nga@xonotic.org>
Fri, 22 Apr 2011 00:14:48 +0000 (21:14 -0300)
qcsrc/server/bot/bot.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/navigation.qh

index d2ee461da6fdaad61c50951ed9dee3ea965420d1..8be71a3cf09f1f1dadbec0069f10099ebadd22d9 100644 (file)
@@ -376,8 +376,8 @@ void bot_clientdisconnect()
        self.playermodel_freeme = string_null;
        self.playerskin_freeme = string_null;
        remove(self.bot_cmd_current);
-       if(navigation_wander_owner==self)
-               navigation_wander_owner = world;
+       if(bot_waypoint_queue_owner==self)
+               bot_waypoint_queue_owner = world;
 }
 
 void bot_clientconnect()
index c5e2180cae0ee1aec41800883aa5e8d3a11b6b16..4c4044f108b481b5f14f128f1e8d55fbbc38a0c5 100644 (file)
@@ -966,37 +966,37 @@ void navigation_unstuck()
        if not(autocvar_bot_wander_enable)
                return;
 
-       if not(navigation_wander_owner)
+       if not(bot_waypoint_queue_owner)
        {
                dprint(self.netname, " taking over the waypoints queue\n");
-               navigation_wander_owner = self;
-               navigation_wander_bestgoal = world;
-               navigation_wander_bestgoalrating = 0;
+               bot_waypoint_queue_owner = self;
+               bot_waypoint_queue_bestgoal = world;
+               bot_waypoint_queue_bestgoalrating = 0;
        }
 
-       if(navigation_wander_owner!=self)
+       if(bot_waypoint_queue_owner!=self)
                return;
 
-       if (navigation_wander_goal)
+       if (bot_waypoint_queue_goal)
        {
                // evaluate the next goal on the queue
-               float d = vlen(self.origin - navigation_wander_goal.origin);
-               // dprint(self.netname, " evaluating ", navigation_wander_goal.classname, " with distance ", ftos(d), "\n");
-               if(tracewalk(navigation_wander_goal, self.origin, PL_MIN, PL_MAX, navigation_wander_goal.origin, bot_navigation_movemode))
+               float d = vlen(self.origin - bot_waypoint_queue_goal.origin);
+               // dprint(self.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d), "\n");
+               if(tracewalk(bot_waypoint_queue_goal, self.origin, PL_MIN, PL_MAX, bot_waypoint_queue_goal.origin, bot_navigation_movemode))
                {
-                       if( d > navigation_wander_bestgoalrating)
+                       if( d > bot_waypoint_queue_bestgoalrating)
                        {
-                               navigation_wander_bestgoalrating = d;
-                               navigation_wander_bestgoal = navigation_wander_goal;
+                               bot_waypoint_queue_bestgoalrating = d;
+                               bot_waypoint_queue_bestgoal = bot_waypoint_queue_goal;
                        }
                }
-               navigation_wander_goal = navigation_wander_goal.navigation_wander_nextgoal;
+               bot_waypoint_queue_goal = bot_waypoint_queue_goal.bot_waypoint_queue_nextgoal;
 
-               if not(navigation_wander_goal)
+               if not(bot_waypoint_queue_goal)
                {
-                       if (navigation_wander_bestgoal)
+                       if (bot_waypoint_queue_bestgoal)
                        {
-                               navigation_routetogoal(navigation_wander_bestgoal, self.origin);
+                               navigation_routetogoal(bot_waypoint_queue_bestgoal, self.origin);
                                self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                                self.aistatus &~= AI_STATUS_STUCK;
                        }
@@ -1005,7 +1005,7 @@ void navigation_unstuck()
                                dprint(self.netname, " got BADLY stuck, giving up.\n");
                        }
 
-                       navigation_wander_owner = world;
+                       bot_waypoint_queue_owner = world;
                }
        }
        else
@@ -1027,14 +1027,14 @@ void navigation_unstuck()
                                if (first==world)
                                {
                                        first = head;
-                                       navigation_wander_goal = head;
+                                       bot_waypoint_queue_goal = head;
                                }
                                else
                                {
-                                       prev = navigation_wander_goal;
-                                       navigation_wander_goal = head;
-                                       prev.navigation_wander_nextgoal = head;
-                                       navigation_wander_goal.navigation_wander_nextgoal = world;
+                                       prev = bot_waypoint_queue_goal;
+                                       bot_waypoint_queue_goal = head;
+                                       prev.bot_waypoint_queue_nextgoal = head;
+                                       bot_waypoint_queue_goal.bot_waypoint_queue_nextgoal = world;
                                }
                        }
 
@@ -1042,7 +1042,7 @@ void navigation_unstuck()
                }
 
                if (first)
-                       navigation_wander_goal = first;
+                       bot_waypoint_queue_goal = first;
                else
                {
                        dprint(self.netname, " got BADLY stuck, giving up.\n");
index 6355ef70056f0b8c74d9ddd0787e4782dba72f7c..0a9bf14010d17176eab4a7740b9b997f2facd622 100644 (file)
@@ -35,11 +35,11 @@ float DEBUG_NODE_WARNING        = 2;
 float DEBUG_NODE_FAIL           = 3;
 vector debuglastnode;
 
-entity navigation_wander_owner;        // Owner of the temporary list of goals
-entity navigation_wander_goal;         // Head of the temporary list of goals
-.entity navigation_wander_nextgoal;
-entity navigation_wander_bestgoal;
-float navigation_wander_bestgoalrating;
+entity bot_waypoint_queue_owner;       // Owner of the temporary list of goals
+entity bot_waypoint_queue_goal;                // Head of the temporary list of goals
+.entity bot_waypoint_queue_nextgoal;
+entity bot_waypoint_queue_bestgoal;
+float bot_waypoint_queue_bestgoalrating;
 
 /*
  * Functions