]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/waypoints.qh
Bot waypoints: show some informations about the waypoint you're aiming at, both in...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / waypoints.qh
index f772d046c7f1afb1f7dafa5646139cd773357e0d..e661c672d019ab4ad2aeeea5484dcca621c2a5a7 100644 (file)
@@ -3,6 +3,12 @@
  * Globals and Fields
  */
 
+// increase by 0.01 when changes require only waypoint relinking
+// increase by 1 when changes require to manually edit waypoints
+// max 2 decimal places, always specified
+const float WAYPOINT_VERSION = 1.02;
+string waypoint_time;
+
 // fields you can query using prvm_global server to get some statistics about waypoint linking culling
 float relink_total, relink_walkculled, relink_pvsculled, relink_lengthculled;
 
@@ -22,6 +28,7 @@ float botframe_cachedwaypointlinks;
 
 .float wpfire, wpcost, wpconsidered, wpisbox, wplinked, wphardwired;
 .int wpflags;
+.entity wp_aimed;
 
 .vector wpnearestpoint;
 
@@ -31,6 +38,7 @@ float botframe_cachedwaypointlinks;
 
 spawnfunc(waypoint);
 void waypoint_removelink(entity from, entity to);
+int waypoint_getlinknum(entity from, entity to);
 bool waypoint_islinked(entity from, entity to);
 void waypoint_addlink_customcost(entity from, entity to, float c);
 void waypoint_addlink(entity from, entity to);
@@ -39,25 +47,27 @@ void waypoint_clearlinks(entity wp);
 void waypoint_schedulerelink(entity wp);
 
 float waypoint_getlinkcost(entity from, entity to);
-float waypoint_gettravelcost(vector v1, vector v2);
+float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent);
 float waypoint_getlinearcost(float dist);
 void waypoint_updatecost_foralllinks();
 
 void waypoint_remove_fromeditor(entity pl);
 void waypoint_remove(entity wp);
 void waypoint_schedulerelinkall();
-void waypoint_load_links_hardwired();
 void waypoint_save_links();
 void waypoint_saveall();
 
 void waypoint_spawnforitem_force(entity e, vector org);
 void waypoint_spawnforitem(entity e);
-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, entity tracetest_ent);
 void botframe_showwaypointlinks();
 
 float waypoint_loadall();
 bool waypoint_load_links();
+#define waypoint_load_links_hardwired() waypoint_load_or_remove_links_hardwired(false)
+#define waypoint_remove_links_hardwired() waypoint_load_or_remove_links_hardwired(true)
+void waypoint_load_or_remove_links_hardwired(bool removal_mode);
 
 void waypoint_spawn_fromeditor(entity pl);
 entity waypoint_spawn(vector m1, vector m2, float f);
@@ -65,6 +75,6 @@ entity waypoint_spawnpersonal(entity this, vector position);
 
 void waypoint_unreachable(entity pl);
 
-vector waypoint_fixorigin(vector position);
+vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir);
 
 void botframe_autowaypoints();