]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/api.qh
Fix bug in nearest waypoint search I introduced in 01376c61cd
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / api.qh
index 695763fe5606b124684352c992b860a881defb8b..39285f77e1152941870bd2ce14c905eb8601ecd1 100644 (file)
@@ -1,6 +1,8 @@
 #pragma once
 
+#include <server/defs.qh>
 #include <common/weapons/_all.qh>
+#include <common/physics/player.qh>
 
 const int WAYPOINTFLAG_GENERATED = BIT(23);
 const int WAYPOINTFLAG_ITEM = BIT(22);
@@ -28,7 +30,6 @@ float skill;
 .float bot_moveskill; // moving technique
 .float bot_pickup;
 .float(entity player, entity item) bot_pickupevalfunc;
-.float bot_strategytime;
 .string cleanname;
 .float havocbot_role_timeout;
 .float isbot; // true if this client is actually a bot
@@ -70,6 +71,8 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org
 void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius);
 void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, float sradius);
 
+bool havocbot_goalrating_item_pickable_check_players(entity this, vector org, entity item, vector item_org);
+
 vector havocbot_middlepoint;
 float havocbot_middlepoint_radius;
 vector havocbot_symmetryaxis_equation;
@@ -82,10 +85,19 @@ void navigation_dynamicgoal_unset(entity this);
 entity navigation_findnearestwaypoint(entity ent, float walkfromwp);
 void navigation_goalrating_end(entity this);
 void navigation_goalrating_start(entity this);
+void navigation_goalrating_timeout_set(entity this);
+void navigation_goalrating_timeout_force(entity this);
+void navigation_goalrating_timeout_expire(entity this, float seconds);
+bool navigation_goalrating_timeout(entity this);
+bool navigation_goalrating_timeout_can_be_anticipated(entity this);
 void navigation_markroutes(entity this, entity fixed_source_waypoint);
 void navigation_markroutes_inverted(entity fixed_source_waypoint);
 void navigation_routerating(entity this, entity e, float f, float rangebias);
 
+vector get_closer_dest(entity ent, vector org);
+
+void set_tracewalk_dest(entity ent, vector org, bool fix_player_dest);
+vector set_tracewalk_dest_2(entity ent, vector org);
 bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float end_height, float movemode);
 
 void waypoint_remove_fromeditor(entity pl);
@@ -95,11 +107,8 @@ void waypoint_schedulerelinkall();
 void waypoint_schedulerelink(entity wp);
 void waypoint_spawnforitem(entity e);
 void waypoint_spawnforitem_force(entity e, vector org);
-void waypoint_spawnforteleporter(entity e, vector destination, float timetaken);
-void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken);
+void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent);
+void waypoint_spawnforteleporter_wz(entity e, vector org, vector destination, float timetaken, vector down_dir, entity tracetest_ent);
 void waypoint_spawn_fromeditor(entity pl);
 entity waypoint_spawn(vector m1, vector m2, float f);
 void waypoint_unreachable(entity pl);
-
-.entity goalcurrent;
-void navigation_clearroute(entity this);