]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/bot/default/waypoints.qh
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / waypoints.qh
1 #pragma once
2 /*
3  * Globals and Fields
4  */
5
6 // fields you can query using prvm_global server to get some statistics about waypoint linking culling
7 float relink_total, relink_walkculled, relink_pvsculled, relink_lengthculled;
8
9 float botframe_waypointeditorlightningtime;
10 float botframe_loadedforcedlinks;
11 float botframe_cachedwaypointlinks;
12
13 // waypoint wp links to waypoint wp.wpXX (OUTGOING link)
14 // links are sorted by their cost (wpXXmincost)
15 .entity wp00, wp01, wp02, wp03, wp04, wp05, wp06, wp07, wp08, wp09, wp10, wp11, wp12, wp13, wp14, wp15;
16 .entity wp16, wp17, wp18, wp19, wp20, wp21, wp22, wp23, wp24, wp25, wp26, wp27, wp28, wp29, wp30, wp31;
17
18 .float wp00mincost, wp01mincost, wp02mincost, wp03mincost, wp04mincost, wp05mincost, wp06mincost, wp07mincost;
19 .float wp08mincost, wp09mincost, wp10mincost, wp11mincost, wp12mincost, wp13mincost, wp14mincost, wp15mincost;
20 .float wp16mincost, wp17mincost, wp18mincost, wp19mincost, wp20mincost, wp21mincost, wp22mincost, wp23mincost;
21 .float wp24mincost, wp25mincost, wp26mincost, wp27mincost, wp28mincost, wp29mincost, wp30mincost, wp31mincost;
22
23 .float wpfire, wpcost, wpconsidered, wpisbox, wplinked, wphardwired;
24 .int wpflags;
25
26 .vector wpnearestpoint;
27
28 /*
29  * Functions
30  */
31
32 spawnfunc(waypoint);
33 void waypoint_removelink(entity from, entity to);
34 bool waypoint_islinked(entity from, entity to);
35 void waypoint_addlink_customcost(entity from, entity to, float c);
36 void waypoint_addlink(entity from, entity to);
37 void waypoint_think(entity this);
38 void waypoint_clearlinks(entity wp);
39 void waypoint_schedulerelink(entity wp);
40
41 float waypoint_getlinkcost(entity from, entity to);
42 float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent);
43 float waypoint_getlinearcost(float dist);
44 void waypoint_updatecost_foralllinks();
45
46 void waypoint_remove_fromeditor(entity pl);
47 void waypoint_remove(entity wp);
48 void waypoint_schedulerelinkall();
49 void waypoint_load_links_hardwired();
50 void waypoint_save_links();
51 void waypoint_saveall();
52
53 void waypoint_spawnforitem_force(entity e, vector org);
54 void waypoint_spawnforitem(entity e);
55 void waypoint_spawnforteleporter(entity e, vector destination, float timetaken);
56 void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken);
57 void botframe_showwaypointlinks();
58
59 float waypoint_loadall();
60 bool waypoint_load_links();
61
62 void waypoint_spawn_fromeditor(entity pl);
63 entity waypoint_spawn(vector m1, vector m2, float f);
64 entity waypoint_spawnpersonal(entity this, vector position);
65
66 void waypoint_unreachable(entity pl);
67
68 vector waypoint_fixorigin(vector position);
69
70 void botframe_autowaypoints();