]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/vehicles/vehicles_def.qh
Remove includes from most headers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles_def.qh
1 #ifndef VEHICLES_DEF_H
2 #define VEHICLES_DEF_H
3
4 // #define VEHICLES_USE_ODE
5 #define VEHICLES_ENABLED
6 #ifdef VEHICLES_ENABLED
7
8 .float vehicle_flags;
9 const float VHF_ISVEHICLE     = 2;    /// Indicates vehicle
10 const float VHF_HASSHIELD     = 4;    /// Vehicle has shileding
11 const float VHF_SHIELDREGEN   = 8;    /// Vehicles shield regenerates
12 const float VHF_HEALTHREGEN   = 16;   /// Vehicles health regenerates
13 const float VHF_ENERGYREGEN   = 32;   /// Vehicles energy regenerates
14 const float VHF_DEATHEJECT    = 64;   /// Vehicle ejects pilot upon fatal damage
15 const float VHF_MOVE_GROUND   = 128;  /// Vehicle moves on gound
16 const float VHF_MOVE_HOVER    = 256;  /// Vehicle hover close to gound
17 const float VHF_MOVE_FLY      = 512;  /// Vehicle is airborn
18 const float VHF_DMGSHAKE      = 1024; /// Add random velocity each frame if health < 50%
19 const float VHF_DMGROLL       = 2048; /// Add random angles each frame if health < 50%
20 const float VHF_DMGHEADROLL   = 4096; /// Add random head angles each frame if health < 50%
21 const float VHF_MULTISLOT     = 8192; /// Vehicle has multiple player slots
22 const float VHF_PLAYERSLOT    = 16384;    /// This ent is a player slot on a multi-person vehicle
23
24 .entity gun1;
25 .entity gun2;
26 .entity gun3;
27 .entity vehicle_shieldent;  /// Entity to disply the shild effect on damage
28 .entity vehicle;
29 .entity vehicle_viewport;
30 .entity vehicle_hudmodel;
31 .entity vehicle_controller;
32
33 .entity gunner1;
34 .entity gunner2;
35
36 .float vehicle_health;      /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value.
37 .float vehicle_energy;      /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value.
38 .float vehicle_shield;      /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value.
39
40 .float vehicle_ammo1;   /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo1 value.
41 .float vehicle_reload1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload1 value.
42 .float vehicle_ammo2;   /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo2 value.
43 .float vehicle_reload2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload2 value.
44
45 .float sound_nexttime;
46 const float VOL_VEHICLEENGINE = 1;
47
48 .float hud;
49 .float dmg_time;
50 .float  vehicle_respawntime;
51 //.void() vehicle_spawn;
52
53 void vehicles_exit(float eject);
54 .void(float exit_flags) vehicle_exit;
55 const float VHEF_NORMAL = 0;  /// User pressed exit key
56 const float VHEF_EJECT  = 1;  /// User pressed exit key 3 times fast (not implemented) or vehile is dying
57 const float VHEF_RELESE = 2;  /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
58
59 const float SVC_SETVIEWPORT   = 5;   // Net.Protocol 0x05
60 const float SVC_SETVIEWANGLES = 10;  // Net.Protocol 0x0A
61 const float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
62
63 .void() vehicle_enter;  /// Vehicles custom funciton to be executed when owner exit it
64 .void() vehicle_die;    /// Vehicles custom function to be executed when vehile die
65 const float VHSF_NORMAL = 0;
66 const float VHSF_FACTORY = 2;
67 .void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
68 .float(float _imp) vehicles_impulse;
69 .float vehicle_weapon2mode = volly_counter;
70
71 #ifdef VEHICLES_USE_ODE
72 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
73 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
74 void(entity e, vector torque) physics_addtorque = #542; // add relative torque
75 #endif  // VEHICLES_USE_ODE
76 #endif  // VEHICLES_ENABLED
77 #endif