|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "sv_vehicles.qh"#include <common/items/_mod.qh>#include <common/mapobjects/defs.qh>#include <common/mapobjects/teleporters.qh>#include <common/mapobjects/triggers.qh>#include <common/vehicles/vehicles.qh>#include <server/bot/api.qh>#include <server/client.qh>#include <server/damage.qh>#include <server/items/items.qh>#include <server/weapons/common.qh>#include <server/world.qh>Go to the source code of this file.
Variables | |
| vector | axh_prevcolors |
| vector | axh_prevorigin |
| int | old_vehicle_flags |
Definition at line 37 of file sv_vehicles.qc.
References cnt, entity(), owner, and WaypointSprite_getviewentity().
Referenced by UpdateAuxiliaryXhair().
Definition at line 80 of file sv_vehicles.qc.
References entity(), HUD_NORMAL, IS_REAL_CLIENT, MAX_AXH, msg_entity, MSG_ONE, NULL, WriteByte(), and WriteHeader.
Referenced by bumblebee_gunner_enter(), bumblebee_gunner_exit(), raptor_impulse(), spiderbot_impulse(), vehicles_enter(), and vehicles_exit().
Definition at line 15 of file sv_vehicles.qc.
References cnt, entity(), MSG_ENTITY, origin, rint(), WriteByte(), and WriteHeader.
Referenced by UpdateAuxiliaryXhair().
Definition at line 47 of file sv_vehicles.qc.
References AuxiliaryXhair_customize(), bound(), entity(), IS_REAL_CLIENT, MAX_AXH, Net_LinkEntity(), NULL, SendAuxiliaryXhair(), setcefc, and vector.
Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), racer_frame(), raptor_frame(), and spiderbot_frame().
| bool vehicle_addplayerslot | ( | entity | _owner, |
| entity | _slot, | ||
| int | _hud, | ||
| Model | _hud_model, | ||
| bool(entity, float) | _framefunc, | ||
| void(entity, bool) | _exitfunc, | ||
| float(entity, entity) | _enterfunc ) |
Definition at line 330 of file sv_vehicles.qc.
References EF_ADDITIVE, EF_DOUBLESIDED, EF_FULLBRIGHT, EF_LOWPRECISION, EF_NODEPTHTEST, EF_NOGUNBOB, EF_NOSHADOW, EF_SELECTABLE, EF_TELEPORT_BIT, entity(), setmodel, STAT, vehicle_hudmodel, vehicle_viewport, VHF_MULTISLOT, and VHF_PLAYERSLOT.
| vector vehicle_aimturret | ( | entity | _vehic, |
| vector | _target, | ||
| entity | _turrret, | ||
| string | _tagname, | ||
| float | _pichlimit_min, | ||
| float | _pichlimit_max, | ||
| float | _rotlimit_min, | ||
| float | _rotlimit_max, | ||
| float | _aimspeed, | ||
| float | dt ) |
Definition at line 359 of file sv_vehicles.qc.
References AnglesTransform_FromAngles(), AnglesTransform_LeftDivide(), AnglesTransform_Normalize(), AnglesTransform_ToAngles(), bound(), entity(), gettagindex, gettaginfo, normalize(), vectoangles(), and vector.
Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), and raptor_frame().
Definition at line 920 of file sv_vehicles.qc.
References bool, entity(), imp, IS_DEAD, stuffcmd, and vehicle.
Referenced by ImpulseCommands().
Definition at line 1174 of file sv_vehicles.qc.
References active, ACTIVE_ACTIVE, ACTIVE_NOT, angles, autocvar_g_fullbrightplayers, autocvar_g_nodepthtestplayers, autocvar_g_playerclip_collisions, autocvar_g_vehicles, autocvar_g_vehicles_delayspawn, autocvar_g_vehicles_delayspawn_jitter, bot_attack, DAMAGE_NO, damagedbycontents, DPCONTENTS_BODY, DPCONTENTS_PLAYERCLIP, DPCONTENTS_SOLID, dphitcontentsmask, EF_FULLBRIGHT, EF_NODEPTHTEST, EF_NODRAW, effects, entity(), find(), func_null(), g_bot_targets, g_damagedbycontents, game_starttime, Vehicle::head_model, Vehicle::hud_model, IL_PUSH(), iscreature, LOG_DEBUG, Vehicle::m_maxs, Vehicle::m_mins, mdl, Vehicle::model, MOVE_WORLDONLY, MUTATOR_CALLHOOK, nextthink, NULL, origin, pos1, pos2, random(), respawntime, setmodel, setthink, settouch, takedamage, target, targetname, team, teamplay, teleportable, time, trace_endpos, tur_head, use, vehicle_controller, vehicle_flags, vehicle_hudmodel, vehicle_use(), vehicle_viewport, vehicledef, Vehicle::vehicleid, vehicles_spawn(), vehicles_touch(), VHF_ISVEHICLE, Vehicle::vr_precache(), and Vehicle::vr_setup().
Referenced by spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), and TEST().
| entity vehicle_tossgib | ( | entity | this, |
| entity | _template, | ||
| vector | _vel, | ||
| string | _tag, | ||
| bool | _burn, | ||
| bool | _explode, | ||
| float | _maxtime, | ||
| vector | _rot ) |
Definition at line 298 of file sv_vehicles.qc.
References EF_FLAME, EF_LOWPRECISION, entity(), gettagindex, gettaginfo, MOVETYPE_TOSS, org, random(), set_movetype(), setthink, settouch, SOLID_CORPSE, time, vector, vehicles_gib_explode(), vehicles_gib_think(), and vehicles_gib_touch().
Definition at line 530 of file sv_vehicles.qc.
References active, ACTIVE_ACTIVE, ACTIVE_NOT, EF_NODRAW, effects, entity(), game_stopped, IS_DEAD, LOG_DEBUG, netname, nextthink, setthink, time, tur_head, vehicles_reset_colors(), vehicles_setreturn(), and vehicles_spawn().
Referenced by vehicle_initialize().
Definition at line 430 of file sv_vehicles.qc.
References entity(), g_vehicle_returners, and IL_EACH.
Referenced by vehicles_enter(), vehicles_reset(), and vehicles_setreturn().
Definition at line 735 of file sv_vehicles.qc.
References entity(), IS_MONSTER, IS_PLAYER, and time.
Referenced by vehicles_touch().
| void vehicles_damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | force ) |
Definition at line 633 of file sv_vehicles.qc.
References angles, antilag_clear(), ATTEN_NORM, autocvar_g_vehicles_machinegun_damagerate, autocvar_g_vehicles_rifle_damagerate, autocvar_g_vehicles_tag_damagerate, autocvar_g_vehicles_vaporizer_damagerate, autocvar_g_vehicles_vortex_damagerate, autocvar_g_vehicles_weapon_damagerate, CH_PAIN, damageforcescale, DEATH_ISWEAPON, DEATH_WEAPONOF, dmg_time, EF_LOWPRECISION, EF_NODRAW, enemy, entity(), fabs(), GetResource(), maxs, mins, MSG_BROADCAST, normalize(), NULL, origin, owner, pain_finished, real_origin(), setmodel, setthink, shieldhit_think(), sound_allowed(), spamsound(), TakeResource(), time, vectoangles(), vector, vehicle_flags, vehicle_shield, vehicle_shieldent, vehicledef, vehicles_exit(), vehicles_setreturn(), velocity, VHEF_EJECT, VHEF_RELEASE, VHF_DEATHEJECT, VHF_HASSHIELD, vlen(), VOL_BASE, and Vehicle::vr_death().
Referenced by vehicles_enter(), and vehicles_spawn().
Definition at line 938 of file sv_vehicles.qc.
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().
Definition at line 788 of file sv_vehicles.qc.
References ATTEN_NORM, CH_TRIGGER_SINGLE, CSQCMODEL_AUTOINIT, CSQCVehicleSetup(), DAMAGE_AIM, default_player_alpha, EF_NODRAW, entity(), FL_NOTARGET, func_null(), HUD_NORMAL, IS_DEAD, IS_REAL_CLIENT, Kill_Notification(), LOG_TRACE, m_switchweapon, MAX_WEAPONSLOTS, MOVETYPE_WALK, msg_entity, MSG_ONE, MUTATOR_CALLHOOK, NULL, PlayerDamage(), set_movetype(), SOLID_SLIDEBOX, sound, STAT, SVC_SETVIEWANGLES, SVC_SETVIEWPORT, teamplay, TELEPORT_NORMAL, time, vehicles_exit_running, vehicles_reset_colors(), vehicles_setreturn(), VHF_PLAYERSLOT, VHF_SHIELDREGEN, WaypointSprite_Kill(), weaponentities, WriteAngle(), WriteByte(), and WriteEntity().
Referenced by ClientDisconnect(), ClientKill_Now(), Damage(), MUTATOR_HOOKFUNCTION(), player_regen(), PlayerUseKey(), PutObserverInServer(), PutPlayerInServer(), vehicles_damage(), and vehicles_reset().
Definition at line 764 of file sv_vehicles.qc.
References absmax, absmin, autocvar_g_vehicles_exit_attempts, entity(), maxs, mins, MOVE_NORMAL, normalize(), origin, PL_MAX_CONST, PL_MIN_CONST, randomvec(), trace_allsolid, trace_fraction, trace_startsolid, vector, and vlen().
Referenced by bumblebee_exit(), racer_exit(), raptor_exit(), and spiderbot_exit().
Definition at line 628 of file sv_vehicles.qc.
References entity(), and vehicles_painframe().
Referenced by bumblebee_pilot_frame(), racer_frame(), raptor_frame(), and spiderbot_frame().
Definition at line 276 of file sv_vehicles.qc.
References ATTEN_NORM, CH_SHOTS, entity(), origin, randomvec(), Send_Effect(), sound, VOL_BASE, and wp00.
Referenced by vehicle_tossgib(), and vehicles_gib_touch().
Definition at line 284 of file sv_vehicles.qc.
References entity(), toucher, and vehicles_gib_explode().
Referenced by vehicle_tossgib().
Definition at line 723 of file sv_vehicles.qc.
References entity(), GetResource(), GiveResourceWithLimit(), and RES_LIMIT_NONE.
Referenced by vehicles_enter(), and vehicles_spawn().
Definition at line 746 of file sv_vehicles.qc.
References Damage(), DMG_NOWEP, entity(), min(), NULL, oldvelocity, play_time, Q3SURFACEFLAG_NOIMPACT, time, trace_dphitq3surfaceflags, vdist, velocity, and vlen().
Definition at line 103 of file sv_vehicles.qc.
References entity(), IS_DEAD, IS_TURRET, IS_VEHICLE, lock_soundtime, lock_strength, lock_target, lock_time, max(), min(), NULL, owner, play2(), SAME_TEAM, time, and trace_ent.
Referenced by racer_frame(), and raptor_frame().
Definition at line 604 of file sv_vehicles.qc.
References angles, entity(), GetResource(), max(), max_health, myhealth, origin, owner, pain_frame, random(), randomvec(), Send_Effect(), time, tur_head, vehicle_flags, velocity, VHF_DMGHEADROLL, VHF_DMGROLL, and VHF_DMGSHAKE.
Referenced by vehicles_frame(), and vehicles_think().
| entity vehicles_projectile | ( | entity | this, |
| entity | _mzlfx, | ||
| Sound | _mzlsound, | ||
| vector | _org, | ||
| vector | _vel, | ||
| float | _dmg, | ||
| float | _radi, | ||
| float | _force, | ||
| float | _size, | ||
| int | _deahtype, | ||
| float | _projtype, | ||
| float | _health, | ||
| bool | _cull, | ||
| bool | _clianim, | ||
| entity | _owner ) |
Definition at line 223 of file sv_vehicles.qc.
References ATTEN_NORM, CH_WEAPON_A, CSQCProjectile(), DAMAGE_AIM, entity(), FL_NOTARGET, FL_PROJECTILE, g_bot_dodge, g_projectiles, IL_PUSH(), MOVETYPE_FLYMISSILE, PROJECTILE_MAKETRIGGER, Send_Effect(), set_movetype(), SetResourceExplicit(), setthink, settouch, SOLID_BBOX, sound, SUB_Remove(), TC, time, vector, vehicles_projectile(), vehicles_projectile_damage(), vehicles_projectile_explode(), vehicles_projectile_explode_use(), and VOL_BASE.
Referenced by bumblebee_fire_cannon(), racer_fire_rocket(), spiderbot_rocket_do(), and vehicles_projectile().
| void vehicles_projectile_damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | force ) |
Definition at line 177 of file sv_vehicles.qc.
References DAMAGE_NO, entity(), func_null(), GetResource(), nextthink, setthink, takedamage, TakeResource(), time, vector, and velocity.
Referenced by vehicles_projectile().
Definition at line 194 of file sv_vehicles.qc.
References DMG_NOWEP, entity(), func_null(), NULL, owner, PROJECTILE_TOUCH, projectiledeathtype, RadiusDamage(), realowner, and toucher.
Referenced by vehicles_projectile(), vehicles_projectile_explode_think(), and vehicles_projectile_explode_use().
Definition at line 213 of file sv_vehicles.qc.
References entity(), NULL, and vehicles_projectile_explode().
Referenced by spiderbot_rocket_do().
Definition at line 218 of file sv_vehicles.qc.
References entity(), and vehicles_projectile_explode().
Referenced by vehicles_projectile().
| void vehicles_regen | ( | entity | this, |
| float | timer, | ||
| .float | regen_field, | ||
| float | field_max, | ||
| float | rpause, | ||
| float | regen, | ||
| float | delta_time, | ||
| float | _healthscale ) |
Definition at line 557 of file sv_vehicles.qc.
References entity(), GetResource(), max_health, min(), owner, time, and timer.
Referenced by bumblebee_regen(), racer_frame(), raptor_frame(), raptor_takeoff(), and spiderbot_frame().
| void vehicles_regen_resource | ( | entity | this, |
| float | timer, | ||
| .float | regen_field, | ||
| float | field_max, | ||
| float | rpause, | ||
| float | regen, | ||
| float | delta_time, | ||
| float | _healthscale, | ||
| Resource | resource ) |
Definition at line 572 of file sv_vehicles.qc.
References entity(), GetResource(), max_health, min(), owner, SetResource(), time, and timer.
Referenced by bumblebee_regen(), racer_frame(), raptor_frame(), raptor_takeoff(), and spiderbot_frame().
Definition at line 1101 of file sv_vehicles.qc.
References active, ACTIVE_NOT, entity(), owner, vehicles_clearreturn(), vehicles_exit(), vehicles_spawn(), and VHEF_RELEASE.
Referenced by vehicles_spawn().
Definition at line 377 of file sv_vehicles.qc.
References alpha, autocvar_g_fullbrightplayers, autocvar_g_nodepthtestplayers, avelocity, colormap, colormod, EF_ADDITIVE, EF_DOUBLESIDED, EF_FULLBRIGHT, EF_LOWPRECISION, EF_NODEPTHTEST, EF_NOGUNBOB, EF_NOSHADOW, EF_SELECTABLE, EF_TELEPORT_BIT, effects, entity(), FOREACH_ENTITY_ENT, tag_entity, team, teamplay, tur_head, vector, vehicle_hudmodel, vehicle_shieldent, vehicle_viewport, vehicledef, velocity, and Vehicle::vr_setcolors().
Referenced by vehicle_use(), vehicles_enter(), vehicles_exit(), and vehicles_spawn().
Definition at line 446 of file sv_vehicles.qc.
References entity(), Send_Effect(), setthink, time, vehicles_spawn(), waypointsprite_attached, WaypointSprite_Kill(), and wp00.
Referenced by vehicles_showwp().
Definition at line 507 of file sv_vehicles.qc.
References entity(), g_vehicle_returners, IL_PUSH(), IS_DEAD, min(), setthink, time, vehicles_clearreturn(), and vehicles_showwp().
Referenced by vehicle_use(), vehicles_damage(), and vehicles_exit().
Definition at line 467 of file sv_vehicles.qc.
References entity(), NULL, setthink, spawn, SPRITERULE_DEFAULT, Team_ColorRGB(), teamplay, time, vector, vehicles_return(), vehicles_showwp_goaway(), waypointsprite_attached, WaypointSprite_Ping(), WaypointSprite_Spawn(), WaypointSprite_UpdateBuildFinished(), WaypointSprite_UpdateRule(), and wp00.
Referenced by vehicles_setreturn().
Definition at line 459 of file sv_vehicles.qc.
References entity(), waypointsprite_attached, and WaypointSprite_Kill().
Referenced by vehicles_showwp().
Definition at line 1113 of file sv_vehicles.qc.
References angles, avelocity, bot_attack, classname, CSQCMODEL_AUTOINIT, DAMAGE_AIM, damagedbycontents, DEAD_NO, deadflag, entity(), FL_NOTARGET, flags, FOREACH_CLIENT, g_bot_targets, IL_PUSH(), IS_PLAYER, iscreature, lock_strength, lock_target, LOG_DEBUG, MAX_WEAPONSLOTS, misc_bulletcounter, MOVETYPE_WALK, nextthink, NULL, origin, owner, pos1, pos2, RemoveHook(), Send_Effect(), set_movetype(), setthink, settouch, solid, SOLID_SLIDEBOX, takedamage, team, teleportable, time, vehicle_controller, vehicle_hudmodel, vehicledef, vehicles_damage(), vehicles_heal(), vehicles_reset(), vehicles_reset_colors(), vehicles_think(), vehicles_touch(), velocity, and weaponentities.
Referenced by racer_blowup(), vehicle_initialize(), vehicle_use(), vehicles_reset(), and vehicles_return().
Definition at line 1086 of file sv_vehicles.qc.
References autocvar_g_vehicles_thinkrate, CSQCMODEL_AUTOUPDATE, entity(), nextthink, owner, STAT, time, vehicledef, vehicles_painframe(), and Vehicle::vr_think().
Referenced by bumblebee_land(), raptor_land(), spiderbot_exit(), and vehicles_spawn().
Definition at line 887 of file sv_vehicles.qc.
References autocvar_g_vehicles_crush_dmg, autocvar_g_vehicles_crush_force, autocvar_g_vehicles_crush_minspeed, Damage(), DMG_NOWEP, entity(), MUTATOR_CALLHOOK, normalize(), NULL, owner, play_time, time, toucher, vdist, vehicledef, vehicles_crushable(), vehicles_enter(), velocity, Vehicle::vr_impact(), and weaponLocked().
Referenced by bumblebee_exit(), bumblebee_touch(), vehicle_initialize(), and vehicles_spawn().
| vector axh_prevcolors |
Definition at line 45 of file sv_vehicles.qc.
| vector axh_prevorigin |
Definition at line 44 of file sv_vehicles.qc.
| int old_vehicle_flags |
Definition at line 787 of file sv_vehicles.qc.