Xonotic
waypoints.qh
Go to the documentation of this file.
1 #pragma once
2 
4 
11 
12 // increase by 0.01 when changes require only waypoint relinking
13 // increase by 1 when changes require to manually edit waypoints
14 // max 2 decimal places, always specified
15 const float WAYPOINT_VERSION = 1.04;
18 
19 // fields you can query using prvm_global server to get some statistics about waypoint linking culling
21 
25 
26 // waypoint wp links to waypoint wp.wpXX (OUTGOING link)
27 // links are sorted by their cost (wpXXmincost)
30 
31 // used by jumppads to store original destination wp, used in case it gets changed in the editor
32 .entity wp00_original;
33 
38 
39 // hardwired links are saved to the .wpXX fields among normal links
40 // AND to the supporting .wphwXX fields to allow identifying them precisely
41 // these links are not sorted, unlike normal links
43 
44 .float wpcost;
46 .int wpflags;
47 .entity wp_aimed;
48 .entity wp_locked;
49 
51 
52 // holds reference to the support waypoint, if any
53 .entity goalentity;
54 #define SUPPORT_WP goalentity
55 
56 /*
57  * Functions
58  */
59 
60 spawnfunc(waypoint);
61 
63 bool waypoint_is_hardwiredlink(entity wp_from, entity wp_to);
64 void waypoint_mark_hardwiredlink(entity wp_from, entity wp_to);
65 void waypoint_unmark_hardwiredlink(entity wp_from, entity wp_to);
66 
69 bool waypoint_islinked(entity from, entity to);
70 void waypoint_addlink_customcost(entity from, entity to, float c);
71 void waypoint_addlink(entity from, entity to);
72 void waypoint_think(entity this);
75 
76 float waypoint_get_assigned_link_cost(entity w, float i);
77 
79 float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent);
80 float waypoint_getlinearcost(float dist);
82 
84 void waypoint_remove(entity wp);
86 void waypoint_save_links();
87 void waypoint_saveall();
88 
91 void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent);
92 void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent);
94 
95 float waypoint_loadall();
96 bool waypoint_load_links();
98 
99 void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp);
100 entity waypoint_spawn(vector m1, vector m2, float f);
102 
104 
105 vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir);
106 
entity wp27
Definition: waypoints.qh:29
float wp06mincost
Definition: waypoints.qh:34
vector wpnearestpoint
Definition: waypoints.qh:50
entity wp00_original
Definition: waypoints.qh:32
entity wp06
Definition: waypoints.qh:28
float botframe_loadedforcedlinks
Definition: waypoints.qh:23
entity wp02
Definition: waypoints.qh:28
entity wp22
Definition: waypoints.qh:29
bool waypoint_islinked(entity from, entity to)
Definition: waypoints.qc:968
float waypoint_getlinkcost(entity from, entity to)
Definition: waypoints.qc:1067
entity wp05
Definition: waypoints.qh:28
void botframe_autowaypoints()
Definition: waypoints.qc:2472
float wp01mincost
Definition: waypoints.qh:34
float wp17mincost
Definition: waypoints.qh:36
entity wp11
Definition: waypoints.qh:28
entity wp16
Definition: waypoints.qh:29
float wp23mincost
Definition: waypoints.qh:36
entity goalentity
Definition: waypoints.qh:53
entity wp17
Definition: waypoints.qh:29
entity wphw01
Definition: waypoints.qh:42
entity() spawn
entity wp19
Definition: waypoints.qh:29
entity wp28
Definition: waypoints.qh:29
float wp28mincost
Definition: waypoints.qh:37
float wp30mincost
Definition: waypoints.qh:37
float wp25mincost
Definition: waypoints.qh:37
bool autocvar_g_waypointeditor_symmetrical_allowload
Definition: waypoints.qh:7
void waypoint_updatecost_foralllinks()
Definition: waypoints.qc:973
void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp)
Definition: waypoints.qc:570
void waypoint_addlink_customcost(entity from, entity to, float c)
Definition: waypoints.qc:1090
entity wphw05
Definition: waypoints.qh:42
float relink_pvsculled
Definition: waypoints.qh:20
entity to
Definition: self.qh:96
int wplinked
Definition: waypoints.qh:45
void waypoint_spawnforitem_force(entity e, vector org)
Definition: waypoints.qc:1978
void waypoint_mark_hardwiredlink(entity wp_from, entity wp_to)
Definition: waypoints.qc:299
float wp04mincost
Definition: waypoints.qh:34
entity wp00
Definition: waypoints.qh:28
entity wp12
Definition: waypoints.qh:28
float wp14mincost
Definition: waypoints.qh:35
float wp10mincost
Definition: waypoints.qh:35
float wp00mincost
Definition: waypoints.qh:34
entity wp10
Definition: waypoints.qh:28
float botframe_cachedwaypointlinks
Definition: waypoints.qh:24
float wp26mincost
Definition: waypoints.qh:37
float wp19mincost
Definition: waypoints.qh:36
float waypoint_get_assigned_link_cost(entity w, float i)
Definition: waypoints.qc:1586
entity wp18
Definition: waypoints.qh:29
vector autocvar_g_waypointeditor_symmetrical_axis
Definition: waypoints.qh:10
void waypoint_load_hardwiredlinks()
Definition: waypoints.qc:1470
float relink_lengthculled
Definition: waypoints.qh:20
entity wp03
Definition: waypoints.qh:28
bool waypointeditor_enabled
Definition: waypoints.qh:3
entity wphw04
Definition: waypoints.qh:42
int waypoint_getlinknum(entity from, entity to)
Definition: waypoints.qc:955
vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir)
Definition: waypoints.qc:1965
void waypoint_remove(entity wp)
Definition: waypoints.qc:821
void waypoint_saveall()
Definition: waypoints.qc:1760
void waypoint_unmark_hardwiredlink(entity wp_from, entity wp_to)
Definition: waypoints.qc:316
entity wp15
Definition: waypoints.qh:28
void waypoint_schedulerelinkall()
Definition: waypoints.qc:1309
entity waypoint_spawn(vector m1, vector m2, float f)
Definition: waypoints.qc:431
entity wphw06
Definition: waypoints.qh:42
float waypoint_version_loaded
Definition: waypoints.qh:16
float wp15mincost
Definition: waypoints.qh:35
void waypoint_remove_fromeditor(entity pl)
Definition: waypoints.qc:840
void waypoint_removelink(entity from, entity to)
Definition: waypoints.qc:907
entity wp_aimed
Definition: waypoints.qh:47
float wp31mincost
Definition: waypoints.qh:37
float wp02mincost
Definition: waypoints.qh:34
void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent)
Definition: waypoints.qc:2031
entity wp09
Definition: waypoints.qh:28
void waypoint_addlink(entity from, entity to)
Definition: waypoints.qc:1135
bool waypoint_has_hardwiredlinks(entity wp)
Definition: waypoints.qc:274
float wp11mincost
Definition: waypoints.qh:35
spawnfunc(waypoint)
Definition: waypoints.qc:1294
entity wp29
Definition: waypoints.qh:29
float wp24mincost
Definition: waypoints.qh:37
float wp12mincost
Definition: waypoints.qh:35
void waypoint_schedulerelink(entity wp)
Definition: waypoints.qc:1275
bool waypoint_load_links()
Definition: waypoints.qc:1322
float wpcost
Definition: waypoints.qh:44
string waypoint_time
Definition: waypoints.qh:17
float wp05mincost
Definition: waypoints.qh:34
float wp21mincost
Definition: waypoints.qh:36
void waypoint_spawnforitem(entity e)
Definition: waypoints.qc:2007
entity wp26
Definition: waypoints.qh:29
entity wp14
Definition: waypoints.qh:28
entity wp24
Definition: waypoints.qh:29
vector(float skel, float bonenum) _skel_get_boneabs_hidden
entity wp23
Definition: waypoints.qh:29
entity waypoint_spawnpersonal(entity this, vector position)
Definition: waypoints.qc:2075
float waypoint_loadall()
Definition: waypoints.qc:1842
entity wphw03
Definition: waypoints.qh:42
void waypoint_think(entity this)
Definition: waypoints.qc:1149
bool autocvar_g_waypointeditor_symmetrical
Definition: waypoints.qh:6
float wp07mincost
Definition: waypoints.qh:34
int wpfire
Definition: waypoints.qh:45
float relink_total
Definition: waypoints.qh:20
float waypoint_getlinearcost(float dist)
Definition: waypoints.qc:1012
float wp13mincost
Definition: waypoints.qh:35
vector autocvar_g_waypointeditor_symmetrical_origin
Definition: waypoints.qh:8
entity wp_locked
Definition: waypoints.qh:48
float wp03mincost
Definition: waypoints.qh:34
int wpconsidered
Definition: waypoints.qh:45
float wp08mincost
Definition: waypoints.qh:35
float wp18mincost
Definition: waypoints.qh:36
entity wp25
Definition: waypoints.qh:29
entity wp08
Definition: waypoints.qh:28
float botframe_waypointeditorlightningtime
Definition: waypoints.qh:22
float wp29mincost
Definition: waypoints.qh:37
entity wp04
Definition: waypoints.qh:28
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent)
Definition: waypoints.qc:2069
float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent)
Definition: waypoints.qc:1030
void botframe_showwaypointlinks()
Definition: waypoints.qc:2156
entity wphw02
Definition: waypoints.qh:42
float relink_walkculled
Definition: waypoints.qh:20
void waypoint_save_links()
Definition: waypoints.qc:1721
bool waypoint_is_hardwiredlink(entity wp_from, entity wp_to)
Definition: waypoints.qc:281
float wp27mincost
Definition: waypoints.qh:37
entity wp01
Definition: waypoints.qh:28
entity wp20
Definition: waypoints.qh:29
entity wp31
Definition: waypoints.qh:29
void waypoint_unreachable(entity pl)
Definition: waypoints.qc:28
float wp16mincost
Definition: waypoints.qh:36
int autocvar_g_waypointeditor_symmetrical_order
Definition: waypoints.qh:9
bool autocvar_g_waypointeditor
Definition: waypoints.qh:5
entity wp13
Definition: waypoints.qh:28
float wp22mincost
Definition: waypoints.qh:36
entity wphw00
Definition: waypoints.qh:42
float wp09mincost
Definition: waypoints.qh:35
float wp20mincost
Definition: waypoints.qh:36
entity wp30
Definition: waypoints.qh:29
entity wphw07
Definition: waypoints.qh:42
const float WAYPOINT_VERSION
Definition: waypoints.qh:15
void waypoint_clearlinks(entity wp)
Definition: waypoints.qc:1255
entity wp21
Definition: waypoints.qh:29
entity wp07
Definition: waypoints.qh:28
int wpisbox
Definition: waypoints.qh:45
int wpflags
Definition: waypoints.qh:46