Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
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
15const 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
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;
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
60spawnfunc(waypoint);
61
63bool waypoint_is_hardwiredlink(entity wp_from, entity wp_to);
64void waypoint_mark_hardwiredlink(entity wp_from, entity wp_to);
66
67void waypoint_removelink(entity from, entity to);
69bool waypoint_islinked(entity from, entity to);
70void waypoint_addlink_customcost(entity from, entity to, float c);
71void waypoint_addlink(entity from, entity to);
72void waypoint_think(entity this);
75
77
78float waypoint_getlinkcost(entity from, entity to);
79float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent);
80float waypoint_getlinearcost(float dist);
82
84void waypoint_remove(entity wp);
87void waypoint_saveall();
88
91void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent);
92void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent);
94
95float waypoint_loadall();
98
99void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp);
100entity waypoint_spawn(vector m1, vector m2, float f);
102
104
105vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir);
106
float wp24mincost
Definition api.qh:61
float wp06mincost
Definition api.qh:58
float wp27mincost
Definition api.qh:61
float wp03mincost
Definition api.qh:58
entity wp19
Definition api.qh:57
float wp29mincost
Definition api.qh:61
float wp11mincost
Definition api.qh:59
entity wp11
Definition api.qh:56
entity wphw02
Definition api.qh:65
float wp14mincost
Definition api.qh:59
float wp26mincost
Definition api.qh:61
float wp01mincost
Definition api.qh:58
float wp19mincost
Definition api.qh:60
float wp25mincost
Definition api.qh:61
float wp21mincost
Definition api.qh:60
entity wp09
Definition api.qh:56
entity wp15
Definition api.qh:56
float wp02mincost
Definition api.qh:58
float wp05mincost
Definition api.qh:58
float wp17mincost
Definition api.qh:60
entity wp24
Definition api.qh:57
entity wp13
Definition api.qh:56
entity wphw06
Definition api.qh:65
entity wp30
Definition api.qh:57
entity wp17
Definition api.qh:57
float wp13mincost
Definition api.qh:59
float wp28mincost
Definition api.qh:61
float wp00mincost
Definition api.qh:58
entity wphw04
Definition api.qh:65
float wp04mincost
Definition api.qh:58
entity wp06
Definition api.qh:56
float wp09mincost
Definition api.qh:59
float wp07mincost
Definition api.qh:58
entity wp22
Definition api.qh:57
entity wp31
Definition api.qh:57
float wp10mincost
Definition api.qh:59
entity wp20
Definition api.qh:57
entity wp25
Definition api.qh:57
entity wp29
Definition api.qh:57
entity wp23
Definition api.qh:57
float wpcost
Definition api.qh:63
entity wp07
Definition api.qh:56
float wp31mincost
Definition api.qh:61
entity wphw01
Definition api.qh:65
entity wp18
Definition api.qh:57
entity wphw07
Definition api.qh:65
entity wp04
Definition api.qh:56
float wp08mincost
Definition api.qh:59
entity wp27
Definition api.qh:57
float wp30mincost
Definition api.qh:61
float wp18mincost
Definition api.qh:60
float wp20mincost
Definition api.qh:60
entity wp26
Definition api.qh:57
float wp15mincost
Definition api.qh:59
float wp23mincost
Definition api.qh:60
entity wp05
Definition api.qh:56
entity wp10
Definition api.qh:56
float wpconsidered
Definition api.qh:62
entity wphw05
Definition api.qh:65
float wp12mincost
Definition api.qh:59
entity wphw00
Definition api.qh:65
entity wp14
Definition api.qh:56
entity wphw03
Definition api.qh:65
entity wp21
Definition api.qh:57
float wp22mincost
Definition api.qh:60
entity wp12
Definition api.qh:56
entity wp16
Definition api.qh:57
entity wp08
Definition api.qh:56
entity wp28
Definition api.qh:57
int wpflags
Definition api.qh:64
float wp16mincost
Definition api.qh:60
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity goalentity
Definition viewloc.qh:16
vector
Definition self.qh:92
vector org
Definition self.qh:92
#define spawnfunc(id)
Definition spawnfunc.qh:96
entity wp01
entity wp03
entity wp02
entity wp00
bool waypoint_load_links()
float relink_total
Definition waypoints.qh:20
float waypoint_get_assigned_link_cost(entity w, float i)
void waypoint_unmark_hardwiredlink(entity wp_from, entity wp_to)
Definition waypoints.qc:318
void waypoint_spawnforitem(entity e)
void waypoint_schedulerelinkall()
bool waypoint_has_hardwiredlinks(entity wp)
Definition waypoints.qc:276
bool waypointeditor_enabled
Definition waypoints.qh:3
vector autocvar_g_waypointeditor_symmetrical_axis
Definition waypoints.qh:10
void waypoint_addlink_customcost(entity from, entity to, float c)
void waypoint_clearlinks(entity wp)
float botframe_cachedwaypointlinks
Definition waypoints.qh:24
bool waypoint_is_hardwiredlink(entity wp_from, entity wp_to)
Definition waypoints.qc:283
float botframe_loadedforcedlinks
Definition waypoints.qh:23
float waypoint_version_loaded
Definition waypoints.qh:16
vector wpnearestpoint
Definition waypoints.qh:50
float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent)
entity wp00_original
Definition waypoints.qh:32
bool waypoint_islinked(entity from, entity to)
Definition waypoints.qc:966
void waypoint_updatecost_foralllinks()
Definition waypoints.qc:971
const float WAYPOINT_VERSION
Definition waypoints.qh:15
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent)
void waypoint_unreachable(entity pl)
Definition waypoints.qc:28
int wpisbox
Definition waypoints.qh:45
bool autocvar_g_waypointeditor_symmetrical_allowload
Definition waypoints.qh:7
void waypoint_addlink(entity from, entity to)
void waypoint_think(entity this)
void waypoint_schedulerelink(entity wp)
void waypoint_removelink(entity from, entity to)
Definition waypoints.qc:905
void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent)
float botframe_waypointeditorlightningtime
Definition waypoints.qh:22
float relink_lengthculled
Definition waypoints.qh:20
float waypoint_loadall()
entity wp_locked
Definition waypoints.qh:48
float relink_walkculled
Definition waypoints.qh:20
void waypoint_load_hardwiredlinks()
int waypoint_getlinknum(entity from, entity to)
Definition waypoints.qc:953
float waypoint_getlinkcost(entity from, entity to)
entity waypoint_spawnpersonal(entity this, vector position)
float relink_pvsculled
Definition waypoints.qh:20
bool autocvar_g_waypointeditor_symmetrical
Definition waypoints.qh:6
entity waypoint_spawn(vector m1, vector m2, float f)
Definition waypoints.qc:433
bool autocvar_g_waypointeditor
Definition waypoints.qh:5
int wpfire
Definition waypoints.qh:45
vector autocvar_g_waypointeditor_symmetrical_origin
Definition waypoints.qh:8
void waypoint_remove_fromeditor(entity pl)
Definition waypoints.qc:838
string waypoint_time
Definition waypoints.qh:17
void waypoint_spawnforitem_force(entity e, vector org)
void waypoint_mark_hardwiredlink(entity wp_from, entity wp_to)
Definition waypoints.qc:301
void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp)
Definition waypoints.qc:568
void botframe_showwaypointlinks()
float waypoint_getlinearcost(float dist)
void waypoint_saveall()
void botframe_autowaypoints()
vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir)
entity wp_aimed
Definition waypoints.qh:47
void waypoint_remove(entity wp)
Definition waypoints.qc:819
int autocvar_g_waypointeditor_symmetrical_order
Definition waypoints.qh:9
int wplinked
Definition waypoints.qh:45
void waypoint_save_links()