Optimize vehicle impact code by only calling vlen() if damage would be taken
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / all.qh
1 #pragma once
2
3 #include "vehicle.qh"
4
5 REGISTRY(Vehicles, BITS(4))
6 #define Vehicles_from(i) _Vehicles_from(i, VEH_Null)
7 REGISTER_REGISTRY(Vehicles)
8 REGISTRY_CHECK(Vehicles)
9
10 const int VEH_FIRST = 1;
11 #define VEH_LAST (Vehicles_COUNT - 1)
12
13 #define REGISTER_VEHICLE(id, inst) REGISTER(Vehicles, VEH, id, vehicleid, inst)
14
15 #if defined(SVQC)
16         #include "sv_vehicles.qh"
17 #elif defined(CSQC)
18         #include "cl_vehicles.qh"
19 #endif
20
21 REGISTER_VEHICLE(Null, NEW(Vehicle));
22
23 #include "vehicle/_mod.qh"