]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/bot/default/waypoints.qh
Merge branch 'master' into Mirio/balance
[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 .entity wp00, wp01, wp02, wp03, wp04, wp05, wp06, wp07, wp08, wp09, wp10, wp11, wp12, wp13, wp14, wp15;
14 .entity wp16, wp17, wp18, wp19, wp20, wp21, wp22, wp23, wp24, wp25, wp26, wp27, wp28, wp29, wp30, wp31;
15
16 // itemscore = (howmuchmoreIwant / howmuchIcanwant) / itemdistance
17 .float wp00mincost, wp01mincost, wp02mincost, wp03mincost, wp04mincost, wp05mincost, wp06mincost, wp07mincost;
18 .float wp08mincost, wp09mincost, wp10mincost, wp11mincost, wp12mincost, wp13mincost, wp14mincost, wp15mincost;
19 .float wp16mincost, wp17mincost, wp18mincost, wp19mincost, wp20mincost, wp21mincost, wp22mincost, wp23mincost;
20 .float wp24mincost, wp25mincost, wp26mincost, wp27mincost, wp28mincost, wp29mincost, wp30mincost, wp31mincost;
21
22 .float wpfire, wpcost, wpconsidered, wpisbox, wplinked, wphardwired;
23 .int wpflags;
24
25 .vector wpnearestpoint;
26
27 /*
28  * Functions
29  */
30
31 spawnfunc(waypoint);
32 void waypoint_addlink(entity from, entity to);
33 void waypoint_think(entity this);
34 void waypoint_clearlinks(entity wp);
35 void waypoint_schedulerelink(entity wp);
36
37 void waypoint_remove(entity e);
38 void waypoint_removeall();
39 void waypoint_schedulerelinkall();
40 void waypoint_load_links_hardwired();
41 void waypoint_save_links();
42 void waypoint_saveall();
43
44 void waypoint_spawnforitem_force(entity e, vector org);
45 void waypoint_spawnforitem(entity e);
46 void waypoint_spawnforteleporter(entity e, vector destination, float timetaken);
47 void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken);
48 void botframe_showwaypointlinks();
49
50 float waypoint_loadall();
51 float waypoint_load_links();
52
53 entity waypoint_spawn(vector m1, vector m2, float f);
54 entity waypoint_spawnpersonal(entity this, vector position);
55
56 vector waypoint_fixorigin(vector position);
57
58 void botframe_autowaypoints();