X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fvehicles%2Fvehicles_def.qh;h=56fc9ea009e542fd219dcf1f42cc922c4ce86e5d;hb=105c4e2c93cadac6c8b09a998333e2f5fe11a533;hp=b9d9fb4a6d068dde6ab06bbe8fa6e79e4803d6b0;hpb=e6b84d3c61943e06b72eed9bf0b1ad73e58ff670;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/vehicles/vehicles_def.qh b/qcsrc/server/vehicles/vehicles_def.qh index b9d9fb4a6..56fc9ea00 100644 --- a/qcsrc/server/vehicles/vehicles_def.qh +++ b/qcsrc/server/vehicles/vehicles_def.qh @@ -3,60 +3,66 @@ #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; -float VHF_DMGROLL = 2048; -float VHF_DMGHEADROLL = 4096; +const float VHF_ISVEHICLE = 2; /// Indicates vehicle +const float VHF_HASSHIELD = 4; /// Vehicle has shileding +const float VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates +const float VHF_HEALTHREGEN = 16; /// Vehicles health regenerates +const float VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates +const float VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage +const float VHF_MOVE_GROUND = 128; /// Vehicle moves on gound +const float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound +const float VHF_MOVE_FLY = 512; /// Vehicle is airborn +const float VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50% +const float VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50% +const float VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50% +const float VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots +const float VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle .entity gun1; .entity gun2; .entity gun3; +.entity vehicle_shieldent; /// Entity to disply the shild effect on damage +.entity vehicle; +.entity vehicle_viewport; +.entity vehicle_hudmodel; +.entity vehicle_controller; + +.entity gunner1; +.entity gunner2; .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. .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. .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. -.entity vehicle_shieldent; /// Entity to disply the shild effect on damage .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. .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. .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. .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. -.entity vehicle; -.entity vehicle_viewport; -.entity vehicle_hudmodel; - .float sound_nexttime; #define VOL_VEHICLEENGINE 1 .float hud; .float dmg_time; .float vehicle_respawntime; -.void() vehicle_spawn; +//.void() vehicle_spawn; void vehicles_exit(float eject); -var .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) +.void(float exit_flags) vehicle_exit; +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 -var .void() vehicle_enter; /// Vehicles custom funciton to be executed when owner exit it -var .void() vehicle_die; /// Vehicles custom function to be executed when vehile die -var .void() vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns -const var .float(float _imp) vehicles_impusle_null; -var .float(float _imp) vehicles_impusle; +.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 +.void(float _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns +.float(float _imp) vehicles_impulse; .float vehicle_weapon2mode = volly_counter; #ifdef VEHICLES_USE_ODE