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
 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
 Vehicles custom fucntion to be efecuted when vehicle (re)spawns.

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
const float SVC_SETVIEWANGLES = 10
const float SVC_SETVIEWPORT = 5
const float SVC_UPDATEENTITY = 128
entity vehicle
const float vehicle_ammo1 = _STAT(VEHICLESTAT_AMMO1)
 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_ammo2 = _STAT(VEHICLESTAT_AMMO2)
 If ent is player this is 0..100 indicating percentage of secondary ammo left. If ent is vehicle, this is the real ammo2 value.
entity vehicle_controller
const float vehicle_energy = _STAT(VEHICLESTAT_ENERGY)
 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.
float vehicle_enter_delay
 Prevent players jumping to and from vehicles instantly.
int vehicle_flags
const float vehicle_health = _STAT(VEHICLESTAT_HEALTH)
 If ent is player this is 0..100 indicating precentage of health left on vehicle. Vehicle's value is the health resource.
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 reload status. If ent is vehicle, this is the real reload1 value.
const float vehicle_reload2 = _STAT(VEHICLESTAT_RELOAD2)
 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 vehicle_shield = _STAT(VEHICLESTAT_SHIELD)
 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.
entity vehicle_shieldent
 Entity to disply the shild effect on damage.
entity vehicle_viewport
float vehicles_exit_running
const int VHEF_EJECT = 1
 User pressed exit key 3 times fast (not implemented) or vehicle is dying.
const int VHEF_NORMAL = 0
 User pressed exit key.
const int VHEF_RELEASE = 2
 Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
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 )

References entity().

◆ STATIC_INIT()

STATIC_INIT ( g_vehicle_returners )

Definition at line 113 of file sv_vehicles.qh.

114{
116}
#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 912 of file sv_vehicles.qc.

913{
914 if (!this.vehicle)
915 return false;
916 if (IS_DEAD(this.vehicle))
917 return false;
918 bool(entity, int) f = this.vehicle.vehicles_impulse;
919 if (f && f(this, imp))
920 return true;
921
922 switch (imp)
923 {
924 case IMP_weapon_drop.impulse:
925 stuffcmd(this, "\ntoggle cl_eventchase_vehicle\nset _vehicles_shownchasemessage 1\n");
926 return true;
927 }
928 return false;
929}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define IS_DEAD(s)
Definition player.qh:244
#define bool
Definition _all.inc:24
#define stuffcmd(cl,...)
Definition progsdefs.qh:23
int int int imp
Definition impulse.qc:90
entity vehicle

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 721 of file sv_vehicles.qc.

722{
723 if (IS_PLAYER(e) && time >= e.vehicle_enter_delay)
724 return true;
725 if (IS_MONSTER(e))
726 return true;
727
728 return false;
729}
#define IS_PLAYER(s)
Definition player.qh:242
float time
#define IS_MONSTER(v)
Definition utils.qh:23

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

Referenced by vehicles_touch().

◆ vehicles_enter()

void vehicles_enter ( entity pl,
entity veh )

Definition at line 931 of file sv_vehicles.qc.

932{
933 // Remove this when bots know how to use vehicles
935 return;
936
937 // TODO: mutator hook to prevent entering vehicles
938 if (!IS_PLAYER(pl)
939 || veh.phase >= time
940 || pl.vehicle_enter_delay >= time
941 || STAT(FROZEN, pl) || StatusEffects_active(STATUSEFFECT_Frozen, pl)
942 || IS_DEAD(pl)
943 || pl.vehicle)
944 return;
945
946 Vehicle info = veh.vehicledef; //REGISTRY_GET(Vehicles, veh.vehicleid);
947
948 if (autocvar_g_vehicles_enter // vehicle's touch function should handle this if entering via use key is disabled (TODO)
949 && (veh.vehicle_flags & VHF_MULTISLOT)
950 && veh.owner && SAME_TEAM(pl, veh))
951 {
952 // we don't need a return value or anything here
953 // if successful the owner check below will prevent anything weird
954 info.vr_gunner_enter(info, veh, pl);
955 }
956
957 if (veh.owner)
958 return; // got here and didn't enter the gunner, return
959
960 if (teamplay && veh.team)
961 if (DIFF_TEAM(pl, veh))
962 if (autocvar_g_vehicles_steal)
963 {
964 FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, veh), Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_VEHICLE_STEAL));
965
966 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_SELF);
967
968 veh.vehicle_shield = 0;
969 veh.old_vehicle_flags = veh.vehicle_flags; // make a backup just so we're not permanently crippling this vehicle
970 veh.vehicle_flags &= ~VHF_SHIELDREGEN;
971
972 if (autocvar_g_vehicles_steal_show_waypoint)
973 {
974 entity wp = WaypointSprite_Spawn(WP_VehicleIntruder, 0, 0, pl, '0 0 68', NULL, veh.team, veh, wps_intruder, true, RADARICON_DANGER);
975 wp.colormod = Team_ColorRGB(pl.team);
976 }
977 }
978 else
979 return;
980
982
983 veh.vehicle_ammo1 = 0;
984 veh.vehicle_ammo2 = 0;
985 veh.vehicle_reload1 = 0;
986 veh.vehicle_reload2 = 0;
987 veh.vehicle_energy = 0;
988
989 veh.owner = pl;
990 pl.vehicle = veh;
991
992 // .viewmodelforclient works better.
993 //veh.vehicle_hudmodel.drawonlytoclient = veh.owner;
994
995 veh.vehicle_hudmodel.viewmodelforclient = pl;
996
997 UNSET_DUCKED(pl);
998 pl.view_ofs = STAT(PL_VIEW_OFS, pl);
999 setsize(pl, STAT(PL_MIN, pl), STAT(PL_MAX, pl));
1000
1001 veh.event_damage = vehicles_damage;
1002 veh.event_heal = vehicles_heal;
1003 veh.nextthink = 0;
1004 pl.items &= ~IT_USING_JETPACK;
1005 pl.angles = veh.angles;
1006 pl.takedamage = DAMAGE_NO;
1007 pl.solid = SOLID_NOT;
1008 pl.disableclientprediction = 1; // physics is no longer run, so this won't be reset
1010 pl.teleportable = false;
1011 pl.alpha = -1;
1012 pl.event_damage = func_null;
1013 pl.view_ofs = '0 0 0';
1014 veh.colormap = pl.colormap;
1015 if (veh.tur_head)
1016 veh.tur_head.colormap = pl.colormap;
1017 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
1018 {
1019 .entity weaponentity = weaponentities[slot];
1020 veh.(weaponentity) = new(temp_wepent);
1021 veh.(weaponentity).m_switchweapon = pl.(weaponentity).m_switchweapon;
1022 }
1023 STAT(HUD, pl) = veh.vehicleid;
1024 pl.PlayerPhysplug = veh.PlayerPhysplug;
1025
1026 pl.vehicle_ammo1 = veh.vehicle_ammo1;
1027 pl.vehicle_ammo2 = veh.vehicle_ammo2;
1028 pl.vehicle_reload1 = veh.vehicle_reload1;
1029 pl.vehicle_reload2 = veh.vehicle_reload2;
1030 pl.vehicle_energy = veh.vehicle_energy;
1031
1032 // Cant do this, hides attached objects too.
1033 //veh.exteriormodeltoclient = veh.owner;
1034 //veh.tur_head.exteriormodeltoclient = veh.owner;
1035
1036 UNSET_ONGROUND(pl);
1037 UNSET_ONGROUND(veh);
1038
1039 veh.team = pl.team;
1040 veh.flags -= FL_NOTARGET;
1041
1042 vehicles_reset_colors(veh, pl);
1043
1044 if (IS_REAL_CLIENT(pl))
1045 {
1046 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_ENTER);
1047
1048 msg_entity = pl;
1050 WriteEntity(MSG_ONE, veh.vehicle_viewport);
1051
1052 // NOTE: engine networked
1054 if (veh.tur_head)
1055 {
1056 WriteAngle(MSG_ONE, veh.tur_head.angles.x + veh.angles.x); // tilt
1057 WriteAngle(MSG_ONE, veh.tur_head.angles.y + veh.angles.y); // yaw
1058 WriteAngle(MSG_ONE, 0); // roll
1059 }
1060 else
1061 {
1062 WriteAngle(MSG_ONE, -veh.angles.x); // tilt
1063 WriteAngle(MSG_ONE, veh.angles.y); // yaw
1064 WriteAngle(MSG_ONE, 0); // roll
1065 }
1066 }
1067
1069
1070 CSQCVehicleSetup(pl, veh.vehicleid);
1071
1072 MUTATOR_CALLHOOK(VehicleEnter, pl, veh);
1073
1075 info.vr_enter(info, veh);
1076
1077 antilag_clear(pl, CS(pl));
1078}
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:77
virtual void vr_enter()
(SERVER) called when a player enters this vehicle
Definition vehicle.qh:75
const int IT_USING_JETPACK
Definition item.qh:27
#define UNSET_DUCKED(s)
Definition player.qh:214
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:139
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:52
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition utils.qh:15
const int VHF_MULTISLOT
Vehicle has multiple player slots.
Definition vehicle.qh:106
const int VHF_SHIELDREGEN
Vehicles shield regenerates.
Definition vehicle.qh:96
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)

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

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

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 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 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 secondary ammo left. If ent is vehicle, this is the real ammo2 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 energy left on vehicle. If ent is vehicle, this is the real energy value.

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

Prevent players jumping to and from vehicles instantly.

Definition at line 104 of file sv_vehicles.qh.

◆ vehicle_flags

int vehicle_flags

◆ vehicle_health

const float vehicle_health = _STAT(VEHICLESTAT_HEALTH)

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 49 of file sv_vehicles.qh.

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

◆ 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 reload status. If ent is vehicle, this is the real reload1 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 reload status. If ent is vehicle, this is the real reload2 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 shield left on vehicle. If ent is vehicle, this is the real shield 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

Entity to disply the shild effect on damage.

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

Definition at line 95 of file sv_vehicles.qh.

Referenced by vehicles_exit().

◆ VHEF_EJECT

const int VHEF_EJECT = 1

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

Definition at line 92 of file sv_vehicles.qh.

Referenced by vehicles_damage().

◆ VHEF_NORMAL

const int VHEF_NORMAL = 0

User pressed exit key.

Definition at line 91 of file sv_vehicles.qh.

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

◆ VHEF_RELEASE

const int VHEF_RELEASE = 2

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

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().