]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/vehicles/vehicles_def.qh
Get rid of unused codepaths
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles_def.qh
1 // #define VEHICLES_USE_ODE
2 #define VEHICLES_ENABLED
3 #ifdef VEHICLES_ENABLED
4
5 //#message "with tZork vehicles (experimental)"
6
7 .float vehicle_flags;
8 float VHF_ISVEHICLE     = 2;    /// Indicates vehicle
9 float VHF_HASSHIELD     = 4;    /// Vehicle has shileding
10 float VHF_SHIELDREGEN   = 8;    /// Vehicles shield regenerates
11 float VHF_HEALTHREGEN   = 16;   /// Vehicles health regenerates
12 float VHF_ENERGYREGEN   = 32;   /// Vehicles energy regenerates
13 float VHF_DEATHEJECT    = 64;   /// Vehicle ejects pilot upon fatal damage
14 float VHF_MOVE_GROUND   = 128;  /// Vehicle moves on gound
15 float VHF_MOVE_HOVER    = 256;  /// Vehicle hover close to gound
16 float VHF_MOVE_FLY      = 512;  /// Vehicle is airborn
17
18 .entity gun1;
19 .entity gun2;
20
21 .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.
22 .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.
23 .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.
24 .entity vehicle_shieldent;  /// Entity to disply the shild effect on damage
25
26 .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.
27 .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.
28 .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.
29 .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.
30
31 .entity vehicle;
32 .entity vehicle_viewport;
33 .entity vehicle_hudmodel;
34
35 .float sound_nexttime;
36 #define VOL_VEHICLEENGINE 1
37
38 .float hud;
39 .float dmg_time;
40 .float  vehicle_respawntime;
41 .void() vehicle_spawn;
42
43 var .void(float exit_flags) vehicle_exit;
44 float VHEF_NORMAL = 0;  /// User pressed exit key
45 float VHEF_EJECT  = 1;  /// User pressed exit key 3 times fast (not implemented) or vehile is dying
46 float VHEF_RELESE = 2;  /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
47
48 float SVC_SETVIEWPORT   = 5;   // Net.Protocol 0x05
49 float SVC_SETVIEWANGLES = 10;  // Net.Protocol 0x0A
50 float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
51
52 var .void() vehicle_enter;  /// Vehicles custom funciton to be executed when owner exit it
53 var .void() vehicle_die;    /// Vehicles custom function to be executed when vehile die
54 var .void() vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
55
56 #ifdef VEHICLES_USE_ODE
57 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
58 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
59 void(entity e, vector torque) physics_addtorque = #542; // add relative torque
60 #endif  // VEHICLES_USE_ODE
61 #endif  // VEHICLES_ENABLED