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