7 #include "../../common/util-pre.qh"
8 #include "../sys-pre.qh"
9 #include "../../dpdefs/progsdefs.qh"
10 #include "../../dpdefs/dpextensions.qh"
11 #include "../sys-post.qh"
12 #include "../../warpzonelib/anglestransform.qh"
13 #include "../../warpzonelib/mathlib.qh"
14 #include "../../warpzonelib/common.qh"
15 #include "../../warpzonelib/util_server.qh"
16 #include "../../warpzonelib/server.qh"
17 #include "../../common/constants.qh"
18 #include "../../common/stats.qh"
19 #include "../../common/teams.qh"
20 #include "../../common/util.qh"
21 #include "../../common/nades.qh"
22 #include "../../common/buffs.qh"
23 #include "../../common/test.qh"
24 #include "../../common/counting.qh"
25 #include "../../common/urllib.qh"
26 #include "../../common/command/markup.qh"
27 #include "../../common/command/rpn.qh"
28 #include "../../common/command/generic.qh"
29 #include "../../common/command/shared_defs.qh"
30 #include "../../common/net_notice.qh"
31 #include "../../common/animdecide.qh"
32 #include "../../common/monsters/monsters.qh"
33 #include "../../common/monsters/sv_monsters.qh"
34 #include "../../common/monsters/spawn.qh"
35 #include "../../common/weapons/config.qh"
36 #include "../../common/weapons/weapons.qh"
37 #include "../weapons/accuracy.qh"
38 #include "../weapons/common.qh"
39 #include "../weapons/csqcprojectile.qh"
40 #include "../weapons/hitplot.qh"
41 #include "../weapons/selection.qh"
42 #include "../weapons/spawning.qh"
43 #include "../weapons/throwing.qh"
44 #include "../weapons/tracing.qh"
45 #include "../weapons/weaponstats.qh"
46 #include "../weapons/weaponsystem.qh"
47 #include "../t_items.qh"
48 #include "../autocvars.qh"
49 #include "../constants.qh"
51 #include "../../common/notifications.qh"
52 #include "../../common/deathtypes.qh"
53 #include "../mutators/mutators_include.qh"
54 #include "../tturrets/include/turrets_early.qh"
57 // #define VEHICLES_USE_ODE
58 #define VEHICLES_ENABLED
59 #ifdef VEHICLES_ENABLED
62 const float VHF_ISVEHICLE = 2; /// Indicates vehicle
63 const float VHF_HASSHIELD = 4; /// Vehicle has shileding
64 const float VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates
65 const float VHF_HEALTHREGEN = 16; /// Vehicles health regenerates
66 const float VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates
67 const float VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage
68 const float VHF_MOVE_GROUND = 128; /// Vehicle moves on gound
69 const float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
70 const float VHF_MOVE_FLY = 512; /// Vehicle is airborn
71 const float VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50%
72 const float VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50%
73 const float VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50%
74 const float VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots
75 const float VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle
80 .entity vehicle_shieldent; /// Entity to disply the shild effect on damage
82 .entity vehicle_viewport;
83 .entity vehicle_hudmodel;
84 .entity vehicle_controller;
89 .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.
90 .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.
91 .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.
93 .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.
94 .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.
95 .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.
96 .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.
98 .float sound_nexttime;
99 const float VOL_VEHICLEENGINE = 1;
103 .float vehicle_respawntime;
104 //.void() vehicle_spawn;
106 void vehicles_exit(float eject);
107 .void(float exit_flags) vehicle_exit;
108 const float VHEF_NORMAL = 0; /// User pressed exit key
109 const float VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying
110 const float VHEF_RELESE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
112 const float SVC_SETVIEWPORT = 5; // Net.Protocol 0x05
113 const float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A
114 const float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80
116 .void() vehicle_enter; /// Vehicles custom funciton to be executed when owner exit it
117 .void() vehicle_die; /// Vehicles custom function to be executed when vehile die
118 const float VHSF_NORMAL = 0;
119 const float VHSF_FACTORY = 2;
120 .void(float _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
121 .float(float _imp) vehicles_impulse;
122 .float vehicle_weapon2mode = volly_counter;
124 #ifdef VEHICLES_USE_ODE
125 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
126 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
127 void(entity e, vector torque) physics_addtorque = #542; // add relative torque
128 #endif // VEHICLES_USE_ODE
129 #endif // VEHICLES_ENABLED