1 // #define VEHICLES_USE_ODE
2 #define VEHICLES_ENABLED
3 #ifdef VEHICLES_ENABLED
6 float VHF_ISVEHICLE = 2; /// Indicates vehicle
7 float VHF_HASSHIELD = 4; /// Vehicle has shileding
8 float VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates
9 float VHF_HEALTHREGEN = 16; /// Vehicles health regenerates
10 float VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates
11 float VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage
12 float VHF_MOVE_GROUND = 128; /// Vehicle moves on gound
13 float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
14 float VHF_MOVE_FLY = 512; /// Vehicle is airborn
15 float VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50%
16 float VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50%
17 float VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50%
18 float VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots
19 float VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle
24 .entity vehicle_shieldent; /// Entity to disply the shild effect on damage
26 .entity vehicle_viewport;
27 .entity vehicle_hudmodel;
28 .entity vehicle_controller;
33 .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.
34 .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.
35 .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.
37 .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.
38 .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.
39 .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.
40 .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.
42 .float sound_nexttime;
43 #define VOL_VEHICLEENGINE 1
47 .float vehicle_respawntime;
48 //.void() vehicle_spawn;
50 void vehicles_exit(float eject);
51 .void(float exit_flags) vehicle_exit;
52 float VHEF_NORMAL = 0; /// User pressed exit key
53 float VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying
54 float VHEF_RELESE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
56 float SVC_SETVIEWPORT = 5; // Net.Protocol 0x05
57 float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A
58 float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80
60 .void() vehicle_enter; /// Vehicles custom funciton to be executed when owner exit it
61 .void() vehicle_die; /// Vehicles custom function to be executed when vehile die
63 #define VHSF_FACTORY 2
64 .void(float _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
65 .float(float _imp) vehicles_impusle;
66 .float vehicle_weapon2mode = volly_counter;
68 //ยง .void() vehicle_factory()
70 #ifdef VEHICLES_USE_ODE
71 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
72 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
73 void(entity e, vector torque) physics_addtorque = #542; // add relative torque
74 #endif // VEHICLES_USE_ODE
75 #endif // VEHICLES_ENABLED