]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/waypoints/all.qh
Merge branch 'terencehill/menu_weaponarena_selection_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / waypoints / all.qh
1 #ifndef WAYPOINTS_ALL_H
2 #define WAYPOINTS_ALL_H
3
4 #include "waypointsprites.qh"
5
6 void RegisterWaypoints();
7 const int MAX_WAYPOINTS = 240;
8 entity WAYPOINTS[MAX_WAYPOINTS], WAYPOINTS_first, WAYPOINTS_last;
9 int WAYPOINT_COUNT;
10 /** If you register a new waypoint, make sure to add it to all.inc */
11 #define REGISTER_WAYPOINT_(id, init) REGISTER(RegisterWaypoints, WP, WAYPOINTS, WAYPOINT_COUNT, id, m_id, init)
12 REGISTER_REGISTRY(RegisterWaypoints)
13
14 CLASS(Waypoint, Object)
15     ATTRIB(Waypoint, m_id, int, 0)
16     ATTRIB(Waypoint, netname, string, string_null)
17     ATTRIB(Waypoint, m_name, string, string_null)
18     ATTRIB(Waypoint, m_color, vector, '1 1 1')
19     ATTRIB(Waypoint, m_blink, int, 1)
20     CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
21         CONSTRUCT(Waypoint);
22         this.netname = _netname;
23         this.m_name = _name;
24         this.m_color = _color;
25         this.m_blink = _blink;
26     }
27 ENDCLASS(Waypoint)
28
29 #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
30
31 #include "all.inc"
32
33 #endif