|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include <common/weapons/all.qh>Go to the source code of this file.
Macros | |
| #define | ATTACK_FINISHED(ent, w) |
| #define | ATTACK_FINISHED_FOR(ent, w, slot) |
| #define | INDEPENDENT_ATTACK_FINISHED 1 |
Functions | |
| void | CL_SpawnWeaponentity (entity e,.entity weaponentity) |
| vector | CL_Weapon_GetShotOrg (int wpn) |
| void (Weapon thiswep, entity actor,.entity weaponentity, int fire) weapon_think | |
| void | W_AttachToShotorg (entity actor,.entity weaponentity, entity flash, vector offset) |
| void | w_clear (Weapon thiswep, entity actor,.entity weaponentity, int fire) |
| void | W_DecreaseAmmo (Weapon wep, entity actor, float ammo_use,.entity weaponentity) |
| void | W_DropEvent (.void(Weapon, entity actor,.entity) event, entity player, int weapon_type, entity weapon_item,.entity weaponentity) |
| void | w_ready (Weapon thiswep, entity actor,.entity weaponentity, int fire) |
| void | W_Reload (entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound) |
| void | W_ResetGunAlign (entity player, int preferred_alignment) |
| void | W_WeaponFrame (Player actor,.entity weaponentity) |
| float | W_WeaponRateFactor (entity this) |
| float | W_WeaponSpeedFactor (entity this) |
| bool | weapon_prepareattack (Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime) |
| bool | weapon_prepareattack_check (Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime) |
| void | weapon_prepareattack_do (entity actor,.entity weaponentity, bool secondary, float attacktime) |
| void | weapon_thinkf (entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func) |
| bool | weaponLocked (entity player) |
| bool | weaponUseForbidden (entity player) |
| #define ATTACK_FINISHED | ( | ent, | |
| w ) |
Definition at line 41 of file weaponsystem.qh.
Referenced by bot_cmd_debug_assert_canfire(), havocbot_chooseweapon(), W_Arc_Attack_Bolt(), W_Devastator_DoRemoteExplode(), W_Devastator_Explode(), W_Hagar_Attack_Auto(), W_HLAC_Attack_Frame(), W_MachineGun_Attack(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Burst(), W_MineLayer_DoRemoteExplode(), W_MineLayer_Explode(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), W_Rifle_BulletHail_Continue(), W_WeaponFrame(), weapon_prepareattack_check(), and weapon_prepareattack_do().
| #define ATTACK_FINISHED_FOR | ( | ent, | |
| w, | |||
| slot ) |
Definition at line 39 of file weaponsystem.qh.
Referenced by PlayerDamage().
| #define INDEPENDENT_ATTACK_FINISHED 1 |
Definition at line 10 of file weaponsystem.qh.
Referenced by W_WeaponFrame().
Definition at line 176 of file weaponsystem.qc.
References CL_ExteriorWeaponentity_Think(), CL_Weaponentity_CustomizeEntityForClient(), CL_Weaponentity_Think(), CSQCMODEL_AUTOINIT, drag_undraggable(), entity(), exteriorweaponentity, setcefc, setmodel, setthink, SOLID_NOT, time, weaponentities, and wepent_link().
Referenced by PutPlayerInServer().
Definition at line 63 of file weaponsystem.qc.
References CL_WeaponEntity_SetModel(), entity(), REGISTRY_GET, spawn, vector, and Weapons.
Referenced by PRECACHE().
Definition at line 660 of file weaponsystem.qc.
References copyentity_qc(), entity(), gettagindex, random(), spawn, and vector.
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(), GetResource(), IT_UNLIMITED_AMMO, M_ARGV, MUTATOR_CALLHOOK, Resource::netname, Weapon::netname, SetResource(), and W_DecreaseAmmo().
Referenced by MUTATOR_HOOKABLE(), W_Crylink_Attack(), W_Crylink_Attack2(), W_DecreaseAmmo(), W_Devastator_Attack(), W_Electro_Attack_Bolt(), W_Electro_Attack_Orb(), W_Hagar_Attack(), W_Hagar_Attack2(), W_Hagar_Attack2_Load(), W_HLAC_Attack(), W_HLAC_Attack2(), W_MachineGun_Attack(), W_MachineGun_Attack_Auto(), W_MineLayer_Attack(), W_Mortar_Attack(), W_Mortar_Attack2(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), W_OverkillNex_Attack(), W_OverkillRocketPropelledChainsaw_Attack(), W_Rifle_FireBullet(), W_Seeker_Fire_Flac(), W_Seeker_Fire_Missile(), W_Seeker_Fire_Tag(), W_Shotgun_Attack(), W_Vaporizer_Attack(), and W_Vortex_Attack().
| void W_DropEvent | ( | .void(Weapon, entity actor,.entity) | event, |
| entity | player, | ||
| int | weapon_type, | ||
| entity | weapon_item, | ||
| .entity | weaponentity ) |
Definition at line 836 of file weaponsystem.qc.
References entity(), REGISTRY_GET, weapon_dropevent_item, and Weapons.
Referenced by Item_GiveTo(), and W_ThrowNewWeapon().
Definition at line 220 of file weaponsystem.qc.
References entity(), w_ready(), weapon_thinkf(), and WS_READY.
Referenced by SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), SOUND(), W_Arc_Attack(), W_Arc_Attack_Bolt(), W_Electro_CheckAttack(), W_Fireball_Attack1_Frame4(), W_Hagar_Attack2_Load_Release(), W_Hagar_Attack_Auto(), W_HLAC_Attack_Frame(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Burst(), W_MachineGun_Attack_Frame(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), w_ready(), W_ReloadedAndReady(), W_Rifle_BulletHail(), W_Shotgun_Attack2(), W_Shotgun_Attack3_Frame1(), W_Shotgun_Attack3_Frame2(), 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, IT_UNLIMITED_AMMO, LOG_TRACE, m_weapon, MUTATOR_CALLHOOK, old_clip_load, play2(), 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, wframe, and WS_READY.
Referenced by MUTATOR_HOOKABLE(), and W_Reload().
Definition at line 436 of file weaponsystem.qc.
References entity(), m_gunalign, 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, m_switchingweapon, m_switchweapon, m_weapon, MAKE_VECTORS, Weapon::mdl, Client::netname, OFFHAND_HOOK, old_clip_load, PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, PHYS_INPUT_BUTTON_HOOK, PS, sound, Weapon::spawnflags, STAT, 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(), weaponname, weaponslot(), weaponUseForbidden(), WEP_FLAG_DUALWIELD, WEP_FLAG_RELOADABLE, WEPSET, WepSet_FromWeapon, Weapon::wr_gonethink(), Weapon::wr_setup(), Weapon::wr_think(), WS_CLEAR, WS_DROP, WS_INUSE, WS_RAISE, and WS_READY.
Referenced by PlayerThink(), and PutPlayerInServer().
Definition at line 33 of file weaponsystem.qc.
Referenced by weapon_prepareattack_do(), and weapon_thinkf().
Definition at line 45 of file weaponsystem.qc.
References autocvar_g_weaponspeedfactor, entity(), M_ARGV, and MUTATOR_CALLHOOK.
Referenced by bot_aim(), W_CalculateProjectileVelocity(), and W_Devastator_Think().
| bool weapon_prepareattack | ( | Weapon | thiswep, |
| entity | actor, | ||
| .entity | weaponentity, | ||
| bool | secondary, | ||
| float | attacktime ) |
Definition at line 342 of file weaponsystem.qc.
References entity(), weapon_prepareattack_check(), and weapon_prepareattack_do().
Referenced by SOUND(), SOUND(), W_Electro_CheckAttack(), and W_Rifle_BulletHail_Continue().
| 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(), game_starttime, NULL, time, TIMEOUT_ACTIVE, timeout_status, weapon_prepareattack_checkammo(), and WS_READY.
Referenced by W_Arc_Beam_Think(), W_Hagar_Attack_Auto(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Frame(), and weapon_prepareattack().
| 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, StatusEffects_active(), StatusEffects_remove(), time, W_DualWielding(), W_WeaponRateFactor(), weapon_frametime, weaponentities, weaponslot(), and WS_INUSE.
Referenced by W_Hagar_Attack2_Load_Release(), and 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, m_weapon, NULL, state, time, w_ready(), W_WeaponRateFactor(), weapon_frametime, weapon_nextthink, WEP_TYPE_MELEE_PRI, WEP_TYPE_MELEE_SEC, wframe, wframe_send(), and WS_RAISE.
Referenced by W_Arc_Attack(), W_Arc_Attack_Bolt(), W_Electro_CheckAttack(), W_Fireball_Attack1_Frame0(), W_Fireball_Attack1_Frame1(), W_Fireball_Attack1_Frame2(), W_Fireball_Attack1_Frame3(), W_Fireball_Attack1_Frame4(), W_Hagar_Attack2_Load_Release(), W_Hagar_Attack_Auto(), W_HLAC_Attack_Frame(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Burst(), W_MachineGun_Attack_Frame(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), w_ready(), W_Reload(), W_Rifle_BulletHail(), W_Rifle_BulletHail_Continue(), W_Shotgun_Attack2(), W_Shotgun_Attack3_Frame1(), W_Shotgun_Attack3_Frame2(), and W_WeaponFrame().
Definition at line 426 of file weaponsystem.qc.
References entity(), game_starttime, game_stopped, MUTATOR_CALLHOOK, StatusEffects_active(), sv_ready_restart_after_countdown, and time.
Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), CanThrowNade(), FireGrapplingHook(), IMPULSE(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), racer_frame(), raptor_frame(), spiderbot_frame(), spiderbot_rocket_do(), vehicles_touch(), W_SwitchWeapon(), and W_WeaponFrame().
Definition at line 419 of file weaponsystem.qc.
References entity(), MUTATOR_CALLHOOK, round_handler_IsActive, and round_handler_IsRoundStarted.
Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), racer_frame(), raptor_frame(), spiderbot_frame(), spiderbot_rocket_do(), W_Hagar_Attack2_Load(), and W_WeaponFrame().
| int ammo_none |
Definition at line 29 of file weaponsystem.qh.
| float attack_finished_for[REGISTRY_MAX(Weapons) *MAX_WEAPONSLOTS] |
Definition at line 34 of file weaponsystem.qh.
| float attack_finished_single[MAX_WEAPONSLOTS] |
Definition at line 35 of file weaponsystem.qh.
Referenced by M_Mage_Attack_Push(), M_Mage_Attack_Teleport(), M_Mage_Defend_Heal(), M_Mage_Defend_Shield(), M_Zombie_Defend_Block(), Monster_Attack_Check(), Monster_Attack_Leap(), Monster_Attack_Leap_Check(), Monster_Attack_Melee(), Monster_Dead(), Monster_Move(), Monster_Move_2D(), Monster_Reset(), spiderbot_rocket_do(), turret_aim_generic(), turret_fire(), turret_firecheck(), and turret_fusionreactor_firecheck().
| float autocvar_g_weapondamagefactor |
Definition at line 6 of file weaponsystem.qh.
Referenced by Damage().
| float autocvar_g_weaponforcefactor |
Definition at line 5 of file weaponsystem.qh.
Referenced by Damage().
| float autocvar_g_weaponratefactor |
Definition at line 7 of file weaponsystem.qh.
Referenced by W_WeaponRateFactor(), and weapon_thinkf().
| float autocvar_g_weaponspeedfactor |
Definition at line 8 of file weaponsystem.qh.
Referenced by W_WeaponSpeedFactor().
| float bulletcounter |
Definition at line 24 of file weaponsystem.qh.
Referenced by W_Fireball_Attack2(), W_Seeker_Fire_Flac(), W_WeaponFrame(), and weapon_prepareattack_do().
| int clip_load |
Definition at line 30 of file weaponsystem.qh.
| int clip_size |
Definition at line 32 of file weaponsystem.qh.
| float internalteam |
Definition at line 19 of file weaponsystem.qh.
Referenced by weapon_defaultspawnfunc().
| int old_clip_load |
Definition at line 31 of file weaponsystem.qh.
Referenced by W_Reload(), and W_WeaponFrame().
| const int W_TICSPERFRAME = 2 |
Definition at line 13 of file weaponsystem.qh.
Referenced by PlayerThink(), and W_WeaponFrame().
| entity weapon_dropevent_item |
Definition at line 20 of file weaponsystem.qh.
Referenced by W_DropEvent().
| float weapon_load[REGISTRY_MAX(Weapons)] |
Definition at line 28 of file weaponsystem.qh.
Referenced by havocbot_chooseweapon_checkreload(), NIX_GiveCurrentWeapon(), PutPlayerInServer(), W_Hagar_Attack2_Load(), W_Reload(), W_ThrowNewWeapon(), and W_WeaponFrame().
| float weapon_nextthink |
Definition at line 16 of file weaponsystem.qh.
| entity weaponentity_fld |
Definition at line 26 of file weaponsystem.qh.
Referenced by CL_ExteriorWeaponentity_Think(), CL_Weaponentity_Think(), GrapplingHookSend(), GrapplingHookThink(), RemoveHook(), W_Arc_Beam_Send(), W_Arc_Beam_Think(), W_Arc_Bolt_Explode(), W_Arc_Bolt_Touch(), W_Blaster_Touch(), W_Crylink_LinkJoinEffect_Think(), W_Crylink_Touch(), W_Devastator_DoRemoteExplode(), W_Devastator_Explode(), W_Devastator_Think(), W_Electro_Explode(), W_Electro_ExplodeComboThink(), W_Electro_Orb_ExplodeOverTime(), W_Electro_Orb_Stick(), W_Fireball_Explode(), W_Hagar_Explode(), W_Hagar_Explode2(), W_HLAC_Touch(), W_Hook_ExplodeThink(), W_MineLayer_DoRemoteExplode(), W_MineLayer_Explode(), W_MineLayer_Stick(), W_MineLayer_Think(), W_Mortar_Grenade_Explode(), W_Mortar_Grenade_Explode2(), W_OverkillRocketPropelledChainsaw_Explode(), W_OverkillRocketPropelledChainsaw_Think(), W_Porto_Fail(), W_RocketMinsta_Laser_Damage(), W_Seeker_Flac_Explode(), W_Seeker_Missile_Explode(), W_Seeker_Tag_Touch(), W_Seeker_Tracker_Think(), W_Seeker_Vollycontroller_Think(), and W_Tuba_NoteOff().