]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/vehicles/all.qh
Vehicles: remove VEH_ACTION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / all.qh
1 #ifndef VEHICLES_ALL_H
2 #define VEHICLES_ALL_H
3
4 #include "vehicle.qh"
5
6 void RegisterVehicles();
7 const int VEH_MAXCOUNT = 24;
8 entity vehicle_info[VEH_MAXCOUNT], vehicle_info_first, vehicle_info_last;
9 Vehicle get_vehicleinfo(int id);
10 int VEH_COUNT;
11 const int VEH_FIRST = 1;
12 #define VEH_LAST (VEH_FIRST + VEH_COUNT - 1)
13 /** If you register a new vehicle, make sure to add it to all.inc */
14 #define REGISTER_VEHICLE(id, inst) REGISTER(RegisterVehicles, VEH, vehicle_info, VEH_COUNT, id, vehicleid, inst)
15 #define REGISTER_VEHICLE_SIMPLE(id, vehicleflags, min_s, max_s, modelname, headmodelname, hudmodelname, headtag, hudtag, viewtag, shortname, vname) \
16     REGISTER_VEHICLE(id, NEW(Vehicle)) {    \
17         this.netname = shortname;           \
18         this.vehicle_name = vname;          \
19         this.mdl = modelname;               \
20         this.spawnflags = vehicleflags;     \
21         this.mins = min_s;                  \
22         this.maxs = max_s;                  \
23         this.model = modelname;             \
24         this.head_model = headmodelname;    \
25         this.hud_model = hudmodelname;      \
26         this.tag_head = headtag;            \
27         this.tag_hud = hudtag;              \
28         this.tag_view = viewtag;            \
29     }                                       \
30     REGISTER_INIT(VEH, id)
31 REGISTER_REGISTRY(RegisterVehicles)
32
33 #if defined(SVQC)
34         #include "sv_vehicles.qh"
35 #elif defined(CSQC)
36         #include "cl_vehicles.qh"
37 #endif
38
39 REGISTER_VEHICLE(Null, NEW(Vehicle));
40
41 #include "all.inc"
42
43 #endif