X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fvehicles%2Fvehicles_def.qh;h=ca40a93e8d9415a5984ce96d59b70fb532adca78;hp=7d5a787d0061d914ca9159d1ebe6a42108057690;hb=82dbcadfd0556053b74638f2e3ae2e57103ddf26;hpb=0d3f9b43325161631e21e0daa8dfdd943975fe74 diff --git a/qcsrc/server/vehicles/vehicles_def.qh b/qcsrc/server/vehicles/vehicles_def.qh index 7d5a787d00..ca40a93e8d 100644 --- a/qcsrc/server/vehicles/vehicles_def.qh +++ b/qcsrc/server/vehicles/vehicles_def.qh @@ -1,22 +1,25 @@ +#ifndef VEHICLES_DEF_H +#define VEHICLES_DEF_H + // #define VEHICLES_USE_ODE #define VEHICLES_ENABLED #ifdef VEHICLES_ENABLED -.float vehicle_flags; -float VHF_ISVEHICLE = 2; /// Indicates vehicle -float VHF_HASSHIELD = 4; /// Vehicle has shileding -float VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates -float VHF_HEALTHREGEN = 16; /// Vehicles health regenerates -float VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates -float VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage -float VHF_MOVE_GROUND = 128; /// Vehicle moves on gound -float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound -float VHF_MOVE_FLY = 512; /// Vehicle is airborn -float VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50% -float VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50% -float VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50% -float VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots -float VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle +.int vehicle_flags; +const int VHF_ISVEHICLE = 2; /// Indicates vehicle +const int VHF_HASSHIELD = 4; /// Vehicle has shileding +const int VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates +const int VHF_HEALTHREGEN = 16; /// Vehicles health regenerates +const int VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates +const int VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage +const int VHF_MOVE_GROUND = 128; /// Vehicle moves on gound +const int VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound +const int VHF_MOVE_FLY = 512; /// Vehicle is airborn +const int VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50% +const int VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50% +const int VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50% +const int VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots +const int VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle .entity gun1; .entity gun2; @@ -40,36 +43,39 @@ float VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-per .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. .float sound_nexttime; -#define VOL_VEHICLEENGINE 1 +const float VOL_VEHICLEENGINE = 1; .float hud; .float dmg_time; .float vehicle_respawntime; //.void() vehicle_spawn; +.float volly_counter; + +.float tur_health; + void vehicles_exit(float eject); .void(float exit_flags) vehicle_exit; -float VHEF_NORMAL = 0; /// User pressed exit key -float VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying -float VHEF_RELESE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented) +const float VHEF_NORMAL = 0; /// User pressed exit key +const float VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying +const float VHEF_RELESE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented) -float SVC_SETVIEWPORT = 5; // Net.Protocol 0x05 -float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A -float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80 +const float SVC_SETVIEWPORT = 5; // Net.Protocol 0x05 +const float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A +const float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80 .void() vehicle_enter; /// Vehicles custom funciton to be executed when owner exit it .void() vehicle_die; /// Vehicles custom function to be executed when vehile die -#define VHSF_NORMAL 0 -#define VHSF_FACTORY 2 +const float VHSF_NORMAL = 0; +const float VHSF_FACTORY = 2; .void(float _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns -.float(float _imp) vehicles_impusle; +.float(float _imp) vehicles_impulse; .float vehicle_weapon2mode = volly_counter; -//ยง .void() vehicle_factory() - #ifdef VEHICLES_USE_ODE void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object 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 void(entity e, vector torque) physics_addtorque = #542; // add relative torque #endif // VEHICLES_USE_ODE #endif // VEHICLES_ENABLED +#endif