Xonotic
|
#include "weaponsystem.qh"
#include <common/animdecide.qh>
#include <common/constants.qh>
#include <common/items/_mod.qh>
#include <common/mapobjects/platforms.qh>
#include <common/monsters/_mod.qh>
#include <common/mutators/mutator/status_effects/_mod.qh>
#include <common/net_linked.qh>
#include <common/notifications/all.qh>
#include <common/resources/sv_resources.qh>
#include <common/state.qh>
#include <common/util.qh>
#include <common/vehicles/all.qh>
#include <common/weapons/_all.qh>
#include <common/wepent.qh>
#include <lib/csqcmodel/sv_model.qh>
#include <server/cheats.qh>
#include <server/client.qh>
#include <server/command/common.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
#include <server/hook.qh>
#include <server/mutators/_mod.qh>
#include <server/round_handler.qh>
#include <server/weapons/selection.qh>
#include <server/world.qh>
Go to the source code of this file.
Definition at line 122 of file weaponsystem.qc.
References alpha, colormap, deadflag, default_player_alpha, default_weapon_alpha, dmg, EF_LOWPRECISION, effects, entity(), gettagindex, glowmod, IS_DEAD, model, nextthink, owner, skin, strcat(), tag_entity, tag_index, time, W_Model(), and weaponentity_fld.
Referenced by CL_SpawnWeaponentity().
Definition at line 176 of file weaponsystem.qc.
References CL_ExteriorWeaponentity_Think(), CL_Weaponentity_CustomizeEntityForClient(), CL_Weaponentity_Think(), drag_undraggable(), entity(), setmodel, setorigin(), setthink, SOLID_NOT, time, and weaponentities.
Referenced by PutPlayerInServer().
Definition at line 63 of file weaponsystem.qc.
References entity(), REGISTRY_GET, spawn(), and vector().
Referenced by PRECACHE().
Definition at line 56 of file weaponsystem.qc.
References IS_SPEC, owner, and viewmodelforclient.
Referenced by CL_SpawnWeaponentity().
Definition at line 79 of file weaponsystem.qc.
References alpha, deadflag, default_player_alpha, default_weapon_alpha, effects, frame, hook, IS_DEAD, m_alpha, model, modelindex, nextthink, owner, time, w_deadflag, w_dmg, w_weaponname, and weaponentity_fld.
Referenced by CL_SpawnWeaponentity().
Definition at line 660 of file weaponsystem.qc.
References copyentity(), entity(), gettagindex, random(), setorigin(), and spawn().
Definition at line 208 of file weaponsystem.qc.
References entity(), and WS_CLEAR.
Referenced by W_WeaponFrame().
Definition at line 690 of file weaponsystem.qc.
References ammo, Weapon::ammo_type, backtrace, entity(), GetAmmoPicture(), GetResource(), M_ARGV, MUTATOR_CALLHOOK, Weapon::netname, SetResource(), and W_DecreaseAmmo().
Referenced by W_DecreaseAmmo().
void W_DropEvent | ( | .void(Weapon, entity actor,.entity) | event, |
entity | player, | ||
float | weapon_type, | ||
entity | weapon_item, | ||
.entity | weaponentity | ||
) |
Definition at line 836 of file weaponsystem.qc.
References REGISTRY_GET, and weapon_dropevent_item.
Referenced by W_ThrowNewWeapon().
Definition at line 220 of file weaponsystem.qc.
References entity(), w_ready(), weapon_thinkf(), and WS_READY.
Referenced by w_ready(), W_ReloadedAndReady(), W_WeaponFrame(), and weapon_thinkf().
Definition at line 758 of file weaponsystem.qc.
References _sound, ATTEN_NORM, autocvar_g_weaponswitch_debug, CH_WEAPON_SINGLE, clip_load, entity(), GetResource(), IS_REAL_CLIENT, LOG_TRACE, MUTATOR_CALLHOOK, old_clip_load, reload_ammo_amount, SND, Sound_fixpath, sprint(), state, strcat(), strcpy, TC, time, VOL_BASE, W_Reload(), W_ReloadedAndReady(), W_SwitchToOtherWeapon(), weapon_load, weapon_thinkf(), weaponslot(), WEP_FLAG_RELOADABLE, and WS_READY.
Referenced by W_Reload().
Definition at line 725 of file weaponsystem.qc.
References ammo, entity(), GetResource(), min(), PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, SetResource(), and w_ready().
Referenced by W_Reload().
Definition at line 436 of file weaponsystem.qc.
References MAX_WEAPONSLOTS, W_DualWielding(), W_GunAlign(), and weaponentities.
Referenced by PlayerThink(), and PutPlayerInServer().
Definition at line 460 of file weaponsystem.qc.
References ATTACK_FINISHED, ATTN_NORM, autocvar_g_weaponswitch_debug, bprint(), bulletcounter, CH_WEAPON_SINGLE, clip_load, clip_size, entity(), frametime, GetResource(), INDEPENDENT_ATTACK_FINISHED, IS_PLAYER, LOG_WARNF, Weapon::mdl, Client::netname, OFFHAND_HOOK, old_clip_load, PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, PHYS_INPUT_BUTTON_HOOK, PS, RES_HEALTH, sound, Weapon::spawnflags, state, TC, time, Client::v_angle, v_forward, v_right, v_up, vector(), VOL_BASE, w_clear(), w_getbestweapon, w_ready(), W_SwitchWeapon(), W_SwitchWeapon_Force(), W_TICSPERFRAME, weapon_frametime, weapon_load, weapon_nextthink, weapon_thinkf(), weaponentities, weaponLocked(), weaponslot(), weaponUseForbidden(), WEP_FLAG_DUALWIELD, WEP_FLAG_RELOADABLE, WEPSET, WepSet_FromWeapon, WS_CLEAR, WS_DROP, WS_INUSE, WS_RAISE, and WS_READY.
Referenced by PlayerThink(), and PutPlayerInServer().
Definition at line 33 of file weaponsystem.qc.
References autocvar_g_weaponratefactor, M_ARGV, and MUTATOR_CALLHOOK.
Referenced by weapon_prepareattack_do(), and weapon_thinkf().
Definition at line 45 of file weaponsystem.qc.
References autocvar_g_weaponspeedfactor, M_ARGV, and MUTATOR_CALLHOOK.
Referenced by bot_aim(), and W_CalculateProjectileVelocity().
bool weapon_prepareattack | ( | Weapon | thiswep, |
entity | actor, | ||
.entity | weaponentity, | ||
bool | secondary, | ||
float | attacktime | ||
) |
Definition at line 342 of file weaponsystem.qc.
References weapon_prepareattack_check(), and weapon_prepareattack_do().
bool weapon_prepareattack_check | ( | Weapon | thiswep, |
entity | actor, | ||
.entity | weaponentity, | ||
bool | secondary, | ||
float | attacktime | ||
) |
Definition at line 273 of file weaponsystem.qc.
References ATTACK_FINISHED, entity(), NULL, state, time, TIMEOUT_ACTIVE, weapon_frametime, weapon_prepareattack_checkammo(), and WS_READY.
Referenced by weapon_prepareattack().
bool weapon_prepareattack_checkammo | ( | Weapon | thiswep, |
entity | actor, | ||
bool | secondary, | ||
.entity | weaponentity | ||
) |
Definition at line 229 of file weaponsystem.qc.
References ammo, ATTEN_NORM, CH_WEAPON_A, IL_EACH, Weapon::m_id, sound, time, VOL_BASE, W_SwitchToOtherWeapon(), and WEP_CVAR.
Referenced by weapon_prepareattack_check().
void weapon_prepareattack_do | ( | entity | actor, |
.entity | weaponentity, | ||
bool | secondary, | ||
float | attacktime | ||
) |
Definition at line 299 of file weaponsystem.qc.
References ATTACK_FINISHED, autocvar_g_weaponswitch_debug_alternate, bulletcounter, entity(), MAX_WEAPONSLOTS, NULL, state, STATUSEFFECT_REMOVE_CLEAR, time, W_DualWielding(), W_WeaponRateFactor(), weapon_frametime, weaponentities, weaponslot(), and WS_INUSE.
Referenced by weapon_prepareattack().
void weapon_thinkf | ( | entity | actor, |
.entity | weaponentity, | ||
WFRAME | fr, | ||
float | t, | ||
void(Weapon thiswep, entity actor,.entity weaponentity, int fire) | func | ||
) |
t | defer thinking until time + t |
func | next think function |
Definition at line 356 of file weaponsystem.qc.
References ANIMACTION_MELEE, ANIMACTION_SHOOT, animdecide_setaction(), autocvar_g_weaponratefactor, backtrace, boolean, entity(), FOREACH_CLIENT, IS_SPEC, NULL, state, time, w_ready(), W_WeaponRateFactor(), weapon_frametime, weapon_nextthink, WEP_TYPE_MELEE_PRI, WEP_TYPE_MELEE_SEC, and WS_RAISE.
Referenced by w_ready(), W_Reload(), and W_WeaponFrame().
Definition at line 426 of file weaponsystem.qc.
References MUTATOR_CALLHOOK, sv_ready_restart_after_countdown, and time.
Referenced by FireGrapplingHook(), IMPULSE(), MUTATOR_HOOKFUNCTION(), vehicles_touch(), W_SwitchWeapon(), and W_WeaponFrame().
Definition at line 419 of file weaponsystem.qc.
References MUTATOR_CALLHOOK, round_handler_IsActive, and round_handler_IsRoundStarted.
Referenced by W_WeaponFrame().
bool hook_switchweapon |
Definition at line 458 of file weaponsystem.qc.
float m_alpha |
Definition at line 74 of file weaponsystem.qc.
Referenced by CL_Weaponentity_Think(), NET_HANDLE(), and viewmodel_draw().
float prevdryfire |
Definition at line 227 of file weaponsystem.qc.
float prevwarntime |
Definition at line 228 of file weaponsystem.qc.
float race_penalty |
Definition at line 272 of file weaponsystem.qc.
float reload_ammo_amount |
Definition at line 721 of file weaponsystem.qc.
Referenced by W_Reload().
float reload_ammo_min |
Definition at line 721 of file weaponsystem.qc.
float reload_complain |
Definition at line 722 of file weaponsystem.qc.
string reload_sound |
Definition at line 723 of file weaponsystem.qc.
float reload_time |
Definition at line 721 of file weaponsystem.qc.
Referenced by Weapon_from_name().
int state |
Definition at line 29 of file weaponsystem.qc.
Referenced by W_Reload(), W_WeaponFrame(), weapon_prepareattack_check(), weapon_prepareattack_do(), and weapon_thinkf().
int w_deadflag |
Definition at line 77 of file weaponsystem.qc.
Referenced by CL_Weaponentity_Think().
int w_dmg |
Definition at line 76 of file weaponsystem.qc.
Referenced by CL_Weaponentity_Think().
string w_weaponname |
Definition at line 75 of file weaponsystem.qc.
Referenced by CL_Weaponentity_Think().
float weapon_frametime |
Definition at line 31 of file weaponsystem.qc.
Referenced by W_WeaponFrame(), weapon_prepareattack_check(), weapon_prepareattack_do(), and weapon_thinkf().