Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_vehicles.qh File Reference
Include dependency graph for sv_vehicles.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VEHICLE_UPDATE_PLAYER(ply, vehi, fld, vhname)
#define VEHICLE_UPDATE_PLAYER_RESOURCE(ply, vehi, fld, vhname, res)

Functions

 AUTOCVAR (g_vehicles_enter, bool, false, "require pressing use key to enter a vehicle")
 AUTOCVAR (g_vehicles_steal, bool, true, "allow stealing enemy vehicles in teamplay modes")
 AUTOCVAR (g_vehicles_steal_show_waypoint, bool, true, "show a waypoint above the thief")
 AUTOCVAR (g_vehicles_teams, bool, true, "allow team specific vehicles")
 bool (entity this, entity player) vehicle_enter
 bool (entity this, int _imp) vehicles_impulse
 Vehicles custom fucntion to be efecuted when vehicle (re)spawns.
 STATIC_INIT (g_vehicle_returners)
bool vehicle_impulse (entity this, int imp)
bool vehicle_initialize (entity this, Vehicle info, float nodrop)
bool vehicles_crushable (entity e)
void vehicles_enter (entity pl, entity veh)
void vehicles_exit (entity vehic, int eject)
 void (entity this, int exit_flags) vehicle_exit
 void (int _spawnflag) vehicle_spawn

Variables

bool autocvar_g_vehicles = true
float autocvar_g_vehicles_allow_bots
float autocvar_g_vehicles_crush_dmg = 70
float autocvar_g_vehicles_crush_force = 50
float autocvar_g_vehicles_crush_minspeed = 100
bool autocvar_g_vehicles_delayspawn = true
float autocvar_g_vehicles_delayspawn_jitter = 10
float autocvar_g_vehicles_enter_radius = 250
int autocvar_g_vehicles_exit_attempts = 25
float autocvar_g_vehicles_machinegun_damagerate = 0.75
float autocvar_g_vehicles_rifle_damagerate = 0.75
float autocvar_g_vehicles_tag_damagerate = 5
float autocvar_g_vehicles_teleportable
float autocvar_g_vehicles_thinkrate = 0.1
float autocvar_g_vehicles_vaporizer_damagerate = 0.5
float autocvar_g_vehicles_vortex_damagerate = 0.75
float autocvar_g_vehicles_weapon_damagerate = 2
entity AuxiliaryXhair [MAX_AXH]
float dmg_time
IntrusiveList g_vehicle_returners
entity gun1
entity gun2
entity gun3
entity gunner1
entity gunner2
float lock_soundtime
float lock_strength
entity lock_target
float lock_time
const int MAX_AXH = 4
float pain_frame
float play_time
float sound_nexttime
 If ent is player this is 0..100 indicating percentage of secondary reload status. If ent is vehicle, this is the real reload2 value.
const float SVC_SETVIEWANGLES = 10
const float SVC_SETVIEWPORT = 5
const float SVC_UPDATEENTITY = 128
entity vehicle
 Entity to disply the shild effect on damage.
const float vehicle_ammo1 = _STAT(VEHICLESTAT_AMMO1)
 If ent is player this is 0..100 indicating precentage of shield left on vehicle. If ent is vehicle, this is the real shield value.
const float vehicle_ammo2 = _STAT(VEHICLESTAT_AMMO2)
 If ent is player this is 0..100 indicating percentage of primary reload status. If ent is vehicle, this is the real reload1 value.
entity vehicle_controller
const float vehicle_energy = _STAT(VEHICLESTAT_ENERGY)
 If ent is player this is 0..100 indicating precentage of health left on vehicle. Vehicle's value is the health resource.
float vehicle_enter_delay
int vehicle_flags
const float vehicle_health = _STAT(VEHICLESTAT_HEALTH)
entity vehicle_hudmodel
float vehicle_last_trace
const float vehicle_reload1 = _STAT(VEHICLESTAT_RELOAD1)
 If ent is player this is 0..100 indicating percentage of primary ammo left UNLESS value is already stored in vehicle_energy. If ent is vehicle, this is the real ammo1 value.
const float vehicle_reload2 = _STAT(VEHICLESTAT_RELOAD2)
 If ent is player this is 0..100 indicating percentage of secondary ammo left. If ent is vehicle, this is the real ammo2 value.
const float vehicle_shield = _STAT(VEHICLESTAT_SHIELD)
 If ent is player this is 0..100 indicating precentage of energy left on vehicle. If ent is vehicle, this is the real energy value.
entity vehicle_shieldent
entity vehicle_viewport
float vehicles_exit_running
 Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
const int VHEF_EJECT = 1
 User pressed exit key.
const int VHEF_NORMAL = 0
const int VHEF_RELEASE = 2
 User pressed exit key 3 times fast (not implemented) or vehicle is dying.
const float VHSF_FACTORY = 2
const float VHSF_NORMAL = 0
const float VOL_VEHICLEENGINE = 1
int volly_counter
entity wps_intruder

Macro Definition Documentation

◆ VEHICLE_UPDATE_PLAYER

#define VEHICLE_UPDATE_PLAYER ( ply,
vehi,
fld,
vhname )
Value:
ply.vehicle_##fld = (vehi.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100

Definition at line 98 of file sv_vehicles.qh.

98#define VEHICLE_UPDATE_PLAYER(ply,vehi,fld,vhname) \
99 ply.vehicle_##fld = (vehi.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100

Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), racer_frame(), raptor_takeoff(), and spiderbot_frame().

◆ VEHICLE_UPDATE_PLAYER_RESOURCE

#define VEHICLE_UPDATE_PLAYER_RESOURCE ( ply,
vehi,
fld,
vhname,
res )
Value:
ply.vehicle_##fld = (GetResource(vehi, res) / autocvar_g_vehicle_##vhname##_##fld) * 100
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.

Definition at line 101 of file sv_vehicles.qh.

101#define VEHICLE_UPDATE_PLAYER_RESOURCE(ply,vehi,fld,vhname,res) \
102 ply.vehicle_##fld = (GetResource(vehi, res) / autocvar_g_vehicle_##vhname##_##fld) * 100

Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), racer_frame(), raptor_takeoff(), and spiderbot_frame().

Function Documentation

◆ AUTOCVAR() [1/4]

AUTOCVAR ( g_vehicles_enter ,
bool ,
false ,
"require pressing use key to enter a vehicle"  )

◆ AUTOCVAR() [2/4]

AUTOCVAR ( g_vehicles_steal ,
bool ,
true ,
"allow stealing enemy vehicles in teamplay modes"  )

◆ AUTOCVAR() [3/4]

AUTOCVAR ( g_vehicles_steal_show_waypoint ,
bool ,
true ,
"show a waypoint above the thief"  )

◆ AUTOCVAR() [4/4]

AUTOCVAR ( g_vehicles_teams ,
bool ,
true ,
"allow team specific vehicles"  )

◆ bool() [1/2]

bool ( entity this,
entity player )

References entity().

◆ bool() [2/2]

bool ( entity this,
int _imp )

Vehicles custom fucntion to be efecuted when vehicle (re)spawns.

References entity().

◆ STATIC_INIT()

STATIC_INIT ( g_vehicle_returners )

Definition at line 113 of file sv_vehicles.qh.

#define IL_NEW()
IntrusiveList g_vehicle_returners

References g_vehicle_returners, and IL_NEW.

◆ vehicle_impulse()

bool vehicle_impulse ( entity this,
int imp )

Definition at line 920 of file sv_vehicles.qc.

921{
922 entity v = this.vehicle;
923 if (!v) return false;
924 if (IS_DEAD(v)) return false;
925 bool(entity,int) f = v.vehicles_impulse;
926 if (f && f(this,imp)) return true;
927 switch (imp)
928 {
929 case IMP_weapon_drop.impulse:
930 {
931 stuffcmd(this, "\ntoggle cl_eventchase_vehicle\nset _vehicles_shownchasemessage 1\n");
932 return true;
933 }
934 }
935 return false;
936}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define IS_DEAD(s)
Definition player.qh:245
#define bool
Definition _all.inc:24
#define stuffcmd(cl,...)
Definition progsdefs.qh:23
int int int imp
Definition impulse.qc:90
entity vehicle
Entity to disply the shild effect on damage.

References bool, entity(), imp, IS_DEAD, stuffcmd, and vehicle.

Referenced by ImpulseCommands().

◆ vehicle_initialize()

bool vehicle_initialize ( entity this,
Vehicle info,
float nodrop )

References entity(), and imp.

◆ vehicles_crushable()

bool vehicles_crushable ( entity e)

Definition at line 735 of file sv_vehicles.qc.

736{
737 if(IS_PLAYER(e) && time >= e.vehicle_enter_delay)
738 return true;
739
740 if(IS_MONSTER(e))
741 return true;
742
743 return false;
744}
#define IS_PLAYER(s)
Definition player.qh:243
float time
#define IS_MONSTER(v)
Definition utils.qh:21

References entity(), IS_MONSTER, IS_PLAYER, and time.

Referenced by vehicles_touch().

◆ vehicles_enter()

void vehicles_enter ( entity pl,
entity veh )

Definition at line 938 of file sv_vehicles.qc.

939{
940 // Remove this when bots know how to use vehicles
942 return;
943
944 // TODO: mutator hook to prevent entering vehicles
945 if((!IS_PLAYER(pl))
946 || (veh.phase >= time)
947 || (pl.vehicle_enter_delay >= time)
948 || (STAT(FROZEN, pl) || StatusEffects_active(STATUSEFFECT_Frozen, pl))
949 || (IS_DEAD(pl))
950 || (pl.vehicle)
951 ) { return; }
952
953 Vehicle info = veh.vehicledef; //REGISTRY_GET(Vehicles, veh.vehicleid);
954
955 if(autocvar_g_vehicles_enter) // vehicle's touch function should handle this if entering via use key is disabled (TODO)
956 if(veh.vehicle_flags & VHF_MULTISLOT)
957 if(veh.owner && SAME_TEAM(pl, veh))
958 {
959 // we don't need a return value or anything here
960 // if successful the owner check below will prevent anything weird
961 info.vr_gunner_enter(info, veh, pl);
962 }
963
964 if(veh.owner)
965 return; // got here and didn't enter the gunner, return
966
967 if(teamplay)
968 if(veh.team)
969 if(DIFF_TEAM(pl, veh))
970 if(autocvar_g_vehicles_steal)
971 {
972 FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, veh), Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_VEHICLE_STEAL));
973
974 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_SELF);
975
976 veh.vehicle_shield = 0;
977 veh.old_vehicle_flags = veh.vehicle_flags; // make a backup just so we're not permanently crippling this vehicle
978 veh.vehicle_flags &= ~VHF_SHIELDREGEN;
979
980 if (autocvar_g_vehicles_steal_show_waypoint) {
981 entity wp = WaypointSprite_Spawn(WP_VehicleIntruder, 0, 0, pl, '0 0 68', NULL, veh.team, veh, wps_intruder, true, RADARICON_DANGER);
982 wp.colormod = Team_ColorRGB(pl.team);
983 }
984 }
985 else return;
986
988
989 veh.vehicle_ammo1 = 0;
990 veh.vehicle_ammo2 = 0;
991 veh.vehicle_reload1 = 0;
992 veh.vehicle_reload2 = 0;
993 veh.vehicle_energy = 0;
994
995 veh.owner = pl;
996 pl.vehicle = veh;
997
998 // .viewmodelforclient works better.
999 //veh.vehicle_hudmodel.drawonlytoclient = veh.owner;
1000
1001 veh.vehicle_hudmodel.viewmodelforclient = pl;
1002
1003 UNSET_DUCKED(pl);
1004 pl.view_ofs = STAT(PL_VIEW_OFS, pl);
1005 setsize(pl, STAT(PL_MIN, pl), STAT(PL_MAX, pl));
1006
1007 veh.event_damage = vehicles_damage;
1008 veh.event_heal = vehicles_heal;
1009 veh.nextthink = 0;
1010 pl.items &= ~IT_USING_JETPACK;
1011 pl.angles = veh.angles;
1012 pl.takedamage = DAMAGE_NO;
1013 pl.solid = SOLID_NOT;
1014 pl.disableclientprediction = 1; // physics is no longer run, so this won't be reset
1016 pl.teleportable = false;
1017 pl.alpha = -1;
1018 pl.event_damage = func_null;
1019 pl.view_ofs = '0 0 0';
1020 veh.colormap = pl.colormap;
1021 if(veh.tur_head)
1022 veh.tur_head.colormap = pl.colormap;
1023 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
1024 {
1025 .entity weaponentity = weaponentities[slot];
1026 veh.(weaponentity) = new(temp_wepent);
1027 veh.(weaponentity).m_switchweapon = pl.(weaponentity).m_switchweapon;
1028 }
1029 STAT(HUD, pl) = veh.vehicleid;
1030 pl.PlayerPhysplug = veh.PlayerPhysplug;
1031
1032 pl.vehicle_ammo1 = veh.vehicle_ammo1;
1033 pl.vehicle_ammo2 = veh.vehicle_ammo2;
1034 pl.vehicle_reload1 = veh.vehicle_reload1;
1035 pl.vehicle_reload2 = veh.vehicle_reload2;
1036 pl.vehicle_energy = veh.vehicle_energy;
1037
1038 // Cant do this, hides attached objects too.
1039 //veh.exteriormodeltoclient = veh.owner;
1040 //veh.tur_head.exteriormodeltoclient = veh.owner;
1041
1042 UNSET_ONGROUND(pl);
1043 UNSET_ONGROUND(veh);
1044
1045 veh.team = pl.team;
1046 veh.flags -= FL_NOTARGET;
1047
1048 vehicles_reset_colors(veh, pl);
1049
1050 if (IS_REAL_CLIENT(pl))
1051 {
1052 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_ENTER);
1053
1054 msg_entity = pl;
1056 WriteEntity(MSG_ONE, veh.vehicle_viewport);
1057
1058 // NOTE: engine networked
1060 if(veh.tur_head)
1061 {
1062 WriteAngle(MSG_ONE, veh.tur_head.angles_x + veh.angles_x); // tilt
1063 WriteAngle(MSG_ONE, veh.tur_head.angles_y + veh.angles_y); // yaw
1064 WriteAngle(MSG_ONE, 0); // roll
1065 }
1066 else
1067 {
1068 WriteAngle(MSG_ONE, veh.angles_x * -1); // tilt
1069 WriteAngle(MSG_ONE, veh.angles_y); // yaw
1070 WriteAngle(MSG_ONE, 0); // roll
1071 }
1072 }
1073
1075
1076 CSQCVehicleSetup(pl, veh.vehicleid);
1077
1078 MUTATOR_CALLHOOK(VehicleEnter, pl, veh);
1079
1081 info.vr_enter(info, veh);
1082
1083 antilag_clear(pl, CS(pl));
1084}
void antilag_clear(entity e, entity store)
Definition antilag.qc:114
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
virtual void vr_gunner_enter()
(SERVER) called when a player enters this vehicle while occupied
Definition vehicle.qh:70
virtual void vr_enter()
(SERVER) called when a player enters this vehicle
Definition vehicle.qh:68
const int IT_USING_JETPACK
Definition item.qh:27
#define UNSET_DUCKED(s)
Definition player.qh:212
const int FL_NOTARGET
Definition constants.qh:76
const float SOLID_NOT
#define STAT(...)
Definition stats.qh:82
float MSG_ONE
Definition menudefs.qc:56
void WriteEntity(entity data, float dest, float desto)
void WriteByte(float data, float dest, float desto)
void WriteAngle(float data, float dest, float desto)
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
#define UNSET_ONGROUND(s)
Definition movetypes.qh:18
const int MOVETYPE_NOCLIP
Definition movetypes.qh:137
var void func_null()
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1573
#define NULL
Definition post.qh:14
entity msg_entity
Definition progsdefs.qc:63
void RemoveGrapplingHooks(entity pl)
Definition hook.qc:30
ClientState CS(Client this)
Definition state.qh:47
bool StatusEffects_active(StatusEffect this, entity actor)
const int DAMAGE_NO
Definition subs.qh:79
void CSQCModel_UnlinkEntity(entity e)
Definition sv_model.qc:129
void vehicles_reset_colors(entity this, entity player)
bool vehicles_heal(entity targ, entity inflictor, float amount, float limit)
void CSQCVehicleSetup(entity own, int vehicle_id)
void vehicles_clearreturn(entity veh)
void vehicles_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
const float SVC_SETVIEWANGLES
const float SVC_SETVIEWPORT
float autocvar_g_vehicles_allow_bots
entity wps_intruder
#define SAME_TEAM(a, b)
Definition teams.qh:241
vector Team_ColorRGB(int teamid)
Definition teams.qh:76
bool teamplay
Definition teams.qh:59
#define DIFF_TEAM(a, b)
Definition teams.qh:242
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition utils.qh:15
const int VHF_MULTISLOT
Add random head angles each frame if health < 50%.
Definition vehicle.qh:96
const int VHF_SHIELDREGEN
Vehicle has shileding.
Definition vehicle.qh:86
entity WaypointSprite_Spawn(entity spr, float _lifetime, float maxdistance, entity ref, vector ofs, entity showto, float t, entity own,.entity ownfield, float hideable, entity icon)
const int MAX_WEAPONSLOTS
Definition weapon.qh:16
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
Weapon m_switchweapon
Definition wepent.qh:25

References antilag_clear(), autocvar_g_vehicles_allow_bots, CS(), CSQCModel_UnlinkEntity(), CSQCVehicleSetup(), DAMAGE_NO, DIFF_TEAM, entity(), FL_NOTARGET, FOREACH_CLIENT, func_null(), IS_BOT_CLIENT, IS_DEAD, IS_PLAYER, IS_REAL_CLIENT, IT_USING_JETPACK, m_switchweapon, MAX_WEAPONSLOTS, MOVETYPE_NOCLIP, msg_entity, MSG_ONE, MUTATOR_CALLHOOK, NULL, RemoveGrapplingHooks(), SAME_TEAM, Send_Notification(), set_movetype(), SOLID_NOT, STAT, StatusEffects_active(), SVC_SETVIEWANGLES, SVC_SETVIEWPORT, Team_ColorRGB(), teamplay, time, UNSET_DUCKED, UNSET_ONGROUND, vehicles_clearreturn(), vehicles_damage(), vehicles_heal(), vehicles_reset_colors(), VHF_MULTISLOT, VHF_SHIELDREGEN, Vehicle::vr_enter(), Vehicle::vr_gunner_enter(), WaypointSprite_Spawn(), weaponentities, wps_intruder, WriteAngle(), WriteByte(), and WriteEntity().

Referenced by PlayerUseKey(), and vehicles_touch().

◆ vehicles_exit()

void vehicles_exit ( entity vehic,
int eject )

References entity().

◆ void() [1/2]

void ( entity this,
int exit_flags )

References entity().

◆ void() [2/2]

void ( int _spawnflag)

Variable Documentation

◆ autocvar_g_vehicles

bool autocvar_g_vehicles = true

Definition at line 8 of file sv_vehicles.qh.

Referenced by vehicle_initialize().

◆ autocvar_g_vehicles_allow_bots

float autocvar_g_vehicles_allow_bots

Definition at line 18 of file sv_vehicles.qh.

Referenced by vehicles_enter(), and vehicles_valid_pilot().

◆ autocvar_g_vehicles_crush_dmg

float autocvar_g_vehicles_crush_dmg = 70

Definition at line 13 of file sv_vehicles.qh.

Referenced by vehicles_touch().

◆ autocvar_g_vehicles_crush_force

float autocvar_g_vehicles_crush_force = 50

Definition at line 14 of file sv_vehicles.qh.

Referenced by vehicles_touch().

◆ autocvar_g_vehicles_crush_minspeed

float autocvar_g_vehicles_crush_minspeed = 100

Definition at line 15 of file sv_vehicles.qh.

Referenced by vehicles_touch().

◆ autocvar_g_vehicles_delayspawn

bool autocvar_g_vehicles_delayspawn = true

Definition at line 16 of file sv_vehicles.qh.

Referenced by vehicle_initialize().

◆ autocvar_g_vehicles_delayspawn_jitter

float autocvar_g_vehicles_delayspawn_jitter = 10

Definition at line 17 of file sv_vehicles.qh.

Referenced by vehicle_initialize().

◆ autocvar_g_vehicles_enter_radius

float autocvar_g_vehicles_enter_radius = 250

Definition at line 10 of file sv_vehicles.qh.

Referenced by PlayerFrame(), and PlayerUseKey().

◆ autocvar_g_vehicles_exit_attempts

int autocvar_g_vehicles_exit_attempts = 25

Definition at line 19 of file sv_vehicles.qh.

Referenced by vehicles_findgoodexit().

◆ autocvar_g_vehicles_machinegun_damagerate

float autocvar_g_vehicles_machinegun_damagerate = 0.75

Definition at line 25 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ autocvar_g_vehicles_rifle_damagerate

float autocvar_g_vehicles_rifle_damagerate = 0.75

Definition at line 26 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ autocvar_g_vehicles_tag_damagerate

float autocvar_g_vehicles_tag_damagerate = 5

Definition at line 28 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ autocvar_g_vehicles_teleportable

float autocvar_g_vehicles_teleportable

Definition at line 23 of file sv_vehicles.qh.

Referenced by Portal_Touch().

◆ autocvar_g_vehicles_thinkrate

float autocvar_g_vehicles_thinkrate = 0.1

Definition at line 20 of file sv_vehicles.qh.

Referenced by vehicles_think().

◆ autocvar_g_vehicles_vaporizer_damagerate

float autocvar_g_vehicles_vaporizer_damagerate = 0.5

Definition at line 27 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ autocvar_g_vehicles_vortex_damagerate

float autocvar_g_vehicles_vortex_damagerate = 0.75

Definition at line 24 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ autocvar_g_vehicles_weapon_damagerate

float autocvar_g_vehicles_weapon_damagerate = 2

Definition at line 29 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ AuxiliaryXhair

entity AuxiliaryXhair[MAX_AXH]

Definition at line 77 of file sv_vehicles.qh.

◆ dmg_time

float dmg_time

Definition at line 68 of file sv_vehicles.qh.

Referenced by bumblebee_regen(), Monster_Damage(), and vehicles_damage().

◆ g_vehicle_returners

IntrusiveList g_vehicle_returners

Definition at line 112 of file sv_vehicles.qh.

Referenced by STATIC_INIT(), vehicles_clearreturn(), and vehicles_setreturn().

◆ gun1

◆ gun2

◆ gun3

entity gun3

Definition at line 39 of file sv_vehicles.qh.

Referenced by bumblebee_exit().

◆ gunner1

entity gunner1

Definition at line 46 of file sv_vehicles.qh.

Referenced by bumblebee_touch().

◆ gunner2

entity gunner2

Definition at line 47 of file sv_vehicles.qh.

Referenced by bumblebee_touch().

◆ lock_soundtime

float lock_soundtime

Definition at line 84 of file sv_vehicles.qh.

Referenced by vehicles_locktarget().

◆ lock_strength

float lock_strength

Definition at line 82 of file sv_vehicles.qh.

Referenced by vehicles_locktarget(), and vehicles_spawn().

◆ lock_target

entity lock_target

Definition at line 81 of file sv_vehicles.qh.

Referenced by vehicles_locktarget(), and vehicles_spawn().

◆ lock_time

float lock_time

Definition at line 83 of file sv_vehicles.qh.

Referenced by vehicles_locktarget().

◆ MAX_AXH

const int MAX_AXH = 4

Definition at line 76 of file sv_vehicles.qh.

◆ pain_frame

float pain_frame

Definition at line 70 of file sv_vehicles.qh.

Referenced by vehicles_painframe().

◆ play_time

float play_time

Definition at line 72 of file sv_vehicles.qh.

Referenced by vehicles_impact(), and vehicles_touch().

◆ sound_nexttime

float sound_nexttime

If ent is player this is 0..100 indicating percentage of secondary reload status. If ent is vehicle, this is the real reload2 value.

Definition at line 58 of file sv_vehicles.qh.

◆ SVC_SETVIEWANGLES

const float SVC_SETVIEWANGLES = 10

◆ SVC_SETVIEWPORT

const float SVC_SETVIEWPORT = 5

◆ SVC_UPDATEENTITY

const float SVC_UPDATEENTITY = 128

Definition at line 63 of file sv_vehicles.qh.

◆ vehicle

◆ vehicle_ammo1

const float vehicle_ammo1 = _STAT(VEHICLESTAT_AMMO1)

If ent is player this is 0..100 indicating precentage of shield left on vehicle. If ent is vehicle, this is the real shield value.

Definition at line 53 of file sv_vehicles.qh.

Referenced by bumblebee_pilot_frame(), SpectateCopy(), and spiderbot_frame().

◆ vehicle_ammo2

const float vehicle_ammo2 = _STAT(VEHICLESTAT_AMMO2)

If ent is player this is 0..100 indicating percentage of primary reload status. If ent is vehicle, this is the real reload1 value.

Definition at line 55 of file sv_vehicles.qh.

Referenced by bumblebee_pilot_frame(), raptor_frame(), raptor_takeoff(), SpectateCopy(), and spiderbot_frame().

◆ vehicle_controller

entity vehicle_controller

Definition at line 44 of file sv_vehicles.qh.

Referenced by vehicle_initialize(), and vehicles_spawn().

◆ vehicle_energy

const float vehicle_energy = _STAT(VEHICLESTAT_ENERGY)

If ent is player this is 0..100 indicating precentage of health left on vehicle. Vehicle's value is the health resource.

Definition at line 50 of file sv_vehicles.qh.

Referenced by bumblebee_gunner_frame(), bumblebee_regen(), racer_frame(), raptor_frame(), raptor_takeoff(), and SpectateCopy().

◆ vehicle_enter_delay

float vehicle_enter_delay

Definition at line 104 of file sv_vehicles.qh.

◆ vehicle_flags

int vehicle_flags

◆ vehicle_health

const float vehicle_health = _STAT(VEHICLESTAT_HEALTH)

◆ vehicle_hudmodel

◆ vehicle_last_trace

float vehicle_last_trace

Definition at line 31 of file sv_vehicles.qh.

◆ vehicle_reload1

const float vehicle_reload1 = _STAT(VEHICLESTAT_RELOAD1)

If ent is player this is 0..100 indicating percentage of primary ammo left UNLESS value is already stored in vehicle_energy. If ent is vehicle, this is the real ammo1 value.

Definition at line 54 of file sv_vehicles.qh.

Referenced by bumblebee_gunner_frame(), SpectateCopy(), and spiderbot_frame().

◆ vehicle_reload2

const float vehicle_reload2 = _STAT(VEHICLESTAT_RELOAD2)

If ent is player this is 0..100 indicating percentage of secondary ammo left. If ent is vehicle, this is the real ammo2 value.

Definition at line 56 of file sv_vehicles.qh.

Referenced by raptor_frame(), raptor_takeoff(), SpectateCopy(), and spiderbot_frame().

◆ vehicle_shield

const float vehicle_shield = _STAT(VEHICLESTAT_SHIELD)

If ent is player this is 0..100 indicating precentage of energy left on vehicle. If ent is vehicle, this is the real energy value.

Definition at line 51 of file sv_vehicles.qh.

Referenced by bumblebee_regen(), racer_frame(), raptor_frame(), raptor_takeoff(), SpectateCopy(), spiderbot_frame(), and vehicles_damage().

◆ vehicle_shieldent

entity vehicle_shieldent

Definition at line 40 of file sv_vehicles.qh.

Referenced by vehicles_damage(), and vehicles_reset_colors().

◆ vehicle_viewport

entity vehicle_viewport

Definition at line 42 of file sv_vehicles.qh.

Referenced by vehicle_addplayerslot(), vehicle_initialize(), and vehicles_reset_colors().

◆ vehicles_exit_running

float vehicles_exit_running

Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)

Definition at line 95 of file sv_vehicles.qh.

Referenced by vehicles_exit().

◆ VHEF_EJECT

const int VHEF_EJECT = 1

User pressed exit key.

Definition at line 92 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ VHEF_NORMAL

const int VHEF_NORMAL = 0

Definition at line 91 of file sv_vehicles.qh.

Referenced by PlayerUseKey(), racer_blowup(), and raptor_blowup().

◆ VHEF_RELEASE

const int VHEF_RELEASE = 2

User pressed exit key 3 times fast (not implemented) or vehicle is dying.

Definition at line 93 of file sv_vehicles.qh.

Referenced by ClientDisconnect(), ClientKill_Now(), Damage(), MUTATOR_HOOKFUNCTION(), player_regen(), PutObserverInServer(), PutPlayerInServer(), vehicles_damage(), and vehicles_reset().

◆ VHSF_FACTORY

const float VHSF_FACTORY = 2

Definition at line 66 of file sv_vehicles.qh.

◆ VHSF_NORMAL

const float VHSF_NORMAL = 0

Definition at line 65 of file sv_vehicles.qh.

◆ VOL_VEHICLEENGINE

const float VOL_VEHICLEENGINE = 1

Definition at line 59 of file sv_vehicles.qh.

Referenced by racer_exit(), racer_frame(), raptor_takeoff(), and spiderbot_frame().

◆ volly_counter

int volly_counter

Definition at line 74 of file sv_vehicles.qh.

◆ wps_intruder

entity wps_intruder

Definition at line 79 of file sv_vehicles.qh.

Referenced by vehicles_enter().