]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/vehicles/vehicles_def.qh
Merge remote-tracking branch 'origin/master' into tzork/vehicles-2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles_def.qh
1 #define VEHICLES_ENABLED
2 #ifdef VEHICLES_ENABLED
3
4 //#define VEHICLES_VIEWROTATE_CROSSHAIR
5
6 #message "with tZork vehicles (experimental)"
7
8 float SVC_SETVIEWPORT   = 5;   // Net.Protocol 0x05
9 float SVC_SETVIEWANGLES = 10;  // Net.Protocol 0x0A
10 float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
11
12 .float vehicle_flags;
13 #define VHF_ISVEHICLE   2
14 #define VHF_HASSHIELD   4
15 #define VHF_SHIELDREGEN 8
16 #define VHF_HEALTHREGEN 16
17 #define VHF_ENERGYREGEN  32
18 #define VHF_DEATHEJECT  64
19 #define VHF_MOVE_GROUND 128
20 #define VHF_MOVE_HOVER  256
21 #define VHF_MOVE_FLY    512
22
23 .float hud;
24
25 .entity gun1;
26 .entity gun2;
27
28 .entity vehicle_shieldent;
29
30 .float vehicle_health;
31 .float vehicle_shield;
32 .float vehicle_energy;
33
34 .float vehicle_ammo1;
35 .float vehicle_reload1;
36
37 .float vehicle_ammo2;
38 .float vehicle_reload2;
39
40 .entity vehicle;
41 .entity vehicle_viewport;
42 .entity vehicle_hudmodel;
43
44 .float dmg_time;
45
46 .float  vehicle_respawntime;
47 .void() vehicle_spawn;
48
49 var .void(float exit_flags) vehicle_exit;
50 #define VHEF_NORMAL 0
51 #define VHEF_EJECT  1
52 #define VHEF_RELESE 2
53
54 var .void() vehicle_enter;
55 var .void() vehicle_die;
56 var .void() vehicle_spawn;
57
58 #endif
59
60 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
61 void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force
62 void(entity e, vector torque) physics_addtorque = #542; // add relative torque