|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include <common/items/_mod.qh>#include <common/resources/resources.qh>#include <common/stats.qh>#include <common/effects/qc/_mod.qh>Go to the source code of this file.
Classes | |
| class | OffhandWeapon |
| class | Weapon |
| fields which are explicitly/manually set are marked with "M", fields set automatically are marked with "A" More... | |
| class | WeaponPickup |
Macros | |
| #define | SPAWNFUNC_WEAPON(name, weapon) |
Typedefs | |
| using | WepSet = vector |
Enumerations | |
| enum | { WEPARENA_OFF , WEPARENA_NONE , WEPARENA_CUSTOM , WEPARENA_ALL , WEPARENA_ALL_AVAILABLE , WEPARENA_STANDARD , WEPARENA_STANDARD_AVAILABLE , WEPARENA_EXTENDED , WEPARENA_EXTENDED_AVAILABLE , WEPARENA_DEVALL , WEPARENA_DEVALL_AVAILABLE } |
Functions | |
| void | weapon_defaultspawnfunc (entity this, Weapon e) |
| int | weaponslot (.entity weaponentity) |
Variables | |
| int | autocvar_cl_tracers_teamcolor |
| int | max_shot_distance = 32768 |
| const int | MAX_WEAPONSLOTS = 2 |
| OffhandWeapon | offhand |
| entity | weaponentities [MAX_WEAPONSLOTS] |
| string | weaponorder_byid |
| const int | WEP_FLAG_BLEED = BIT(14) |
| weapon pierces and causes bleeding (used for damage effects) | |
| const int | WEP_FLAG_CANCLIMB = BIT(3) |
| can be used for movement | |
| const int | WEP_FLAG_DUALWIELD = BIT(11) |
| weapon can be dual wielded | |
| const int | WEP_FLAG_HIDDEN = BIT(5) |
| hides from menu | |
| const int | WEP_FLAG_MUTATORBLOCKED = BIT(8) |
| hides from impulse 99 etc. (mutators are allowed to clear this flag) | |
| const int | WEP_FLAG_NODUAL = BIT(12) |
| weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything | |
| const int | WEP_FLAG_NORMAL = BIT(4) |
| in "most weapons" set | |
| const int | WEP_FLAG_NOTRUEAIM = BIT(15) |
| weapon doesn't aim directly at targets | |
| const int | WEP_FLAG_PENETRATEWALLS = BIT(13) |
| weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO) | |
| const int | WEP_FLAG_RELOADABLE = BIT(6) |
| can has reload | |
| const int | WEP_FLAG_SPECIALATTACK = BIT(16) |
| special attack (not a true weapon); NOTE: if this flag is set then WEP_FLAG_HIDDEN must be set as well | |
| const int | WEP_FLAG_SUPERWEAPON = BIT(7) |
| powerup timer | |
| const int | WEP_TYPE_HITSCAN = BIT(2) |
| hitscan | |
| const int | WEP_TYPE_MELEE_PRI = BIT(9) |
| primary attack is melee swing (for animation) | |
| const int | WEP_TYPE_MELEE_SEC = BIT(10) |
| secondary attack is melee swing (for animation) | |
| const int | WEP_TYPE_OTHER = BIT(0) |
| not for damaging people | |
| const int | WEP_TYPE_SPLASH = BIT(1) |
| splash damage | |
| const int | WS_CLEAR = 0 |
| no weapon selected | |
| const int | WS_DROP = 2 |
| deselecting frame | |
| const int | WS_INUSE = 3 |
| fire state | |
| const int | WS_RAISE = 1 |
| raise frame | |
| const int | WS_READY = 4 |
| idle frame | |
Definition at line 186 of file weapon.qh.
Referenced by REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), REGISTER_WEAPON(), and REGISTER_WEAPON().
| anonymous enum |
Definition at line 271 of file weapon.qh.
Definition at line 29 of file spawning.qc.
References Weapon::ammo_type, argv(), autocvar_g_balance_superweapons_time, autocvar_g_pickup_respawntime_superweapon, autocvar_g_pickup_respawntime_weapon, autocvar_g_pickup_respawntimejitter_superweapon, autocvar_g_pickup_respawntimejitter_weapon, autocvar_g_pickup_weapons_anyway, classname, colormapPaletteColor, count, cvar(), entity(), GetAmmoConsumption(), GetResource(), glowmod, internalteam, Item_CopyFields(), ITEM_IS_LOOT, Item_IsDefinitionAllowed(), M_ARGV, Weapon::m_color, m_isreplaced, Weapon::m_spawnfunc_hookreplace(), modelindex, MUTATOR_CALLHOOK, Weapon::netname, owner, pickup_anyway, respawntime, respawntimejitter, rint(), SetResource(), spawn, Weapon::spawnflags, StartItem(), startitem_failed, strcat(), superweapons_finished, team, tokenize_console, W_Apply_Weaponreplace(), weapon_defaultspawnfunc(), Weapon_from_name(), weaponsInMapAll, WEP_CVAR, WEP_FLAG_MUTATORBLOCKED, WEP_FLAG_SUPERWEAPON, WepSet_FromWeapon, and Weapon::wr_init().
Referenced by Item_Initialise(), W_ThrowNewWeapon(), and weapon_defaultspawnfunc().
Definition at line 19 of file weapon.qh.
References entity(), MAX_WEAPONSLOTS, and weaponentities.
Referenced by _wepent_send(), client_hasweapon(), GrapplingHookSend(), Monster_Attack_Check(), W_Arc_Beam_Send(), W_MuzzleFlash(), W_Reload(), W_WeaponFrame(), weapon_prepareattack_do(), and wframe_send().
| int autocvar_cl_tracers_teamcolor |
Definition at line 244 of file weapon.qh.
Referenced by NET_HANDLE(), and NET_HANDLE().
| int max_shot_distance = 32768 |
Definition at line 240 of file weapon.qh.
Referenced by bumblebee_gunner_frame(), CheatCommand(), crosshair_trace(), CursorToWorldCoord(), Draw_ShowNames(), fireBullet_falloff(), HUD_Crosshair(), InitGameplayMode(), MUTATOR_HOOKFUNCTION(), spiderbot_frame(), spiderbot_rocket_do(), TrueAimCheck(), turret_initparams(), W_HitPlotAnalysis(), W_OverkillNex_Attack(), W_Vaporizer_Attack(), W_Vortex_Attack(), and WarpZone_crosshair_trace().
| const int MAX_WEAPONSLOTS = 2 |
Definition at line 16 of file weapon.qh.
Referenced by AppendItemcodes(), bot_cmd_select_weapon(), bumblebee_gunner_enter(), bumblebee_gunner_exit(), CreatureFrame_FallDamage(), CSQC_UpdateView(), Damage(), DrawReticle(), FixIntermissionClient(), for(), freezetag_Freeze(), freezetag_Unfreeze(), GiveItems(), havocbot_ai(), havocbot_movetogoal(), HitSound(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IsZooming(), Item_GiveTo(), Monster_Remove(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_ammo_touch(), NIX_GiveCurrentWeapon(), PlayerDamage(), PlayerPreThink(), PlayerThink(), PM_check_hitground(), PM_ClientMovement_UpdateStatus(), Portal_Think(), Porto_Draw(), PutObserverInServer(), PutPlayerInServer(), REGISTER_MUTATOR(), Remove_GrapplingHook(), RemoveGrapplingHooks(), REPLICATE_APPLYCHANGE(), Reset_ArcBeam(), SetSpectatee(), spiderbot_frame(), STATIC_INIT(), trigger_magicear_processmessage(), vehicles_enter(), vehicles_exit(), vehicles_spawn(), View_CheckButtonStatus(), W_Devastator_Unregister(), W_DualWielding(), W_GunAlign(), W_ResetGunAlign(), weapon_byid_handle(), weapon_group_handle(), weapon_prepareattack_do(), weaponslot(), and X().
| OffhandWeapon offhand |
Definition at line 236 of file weapon.qh.
Referenced by client_hasweapon().
| entity weaponentities[MAX_WEAPONSLOTS] |
Definition at line 17 of file weapon.qh.
Referenced by AppendItemcodes(), bot_cmd_debug_assert_canfire(), bot_cmd_select_weapon(), bumblebee_gunner_enter(), bumblebee_gunner_exit(), CheatCommand(), CL_SpawnWeaponentity(), CreatureFrame_FallDamage(), Damage(), Drag_Update(), FixIntermissionClient(), for(), formatmessage(), freezetag_Freeze(), freezetag_Unfreeze(), GameCommand_animbench(), GameCommand_gettaginfo(), GiveBall(), GiveItems(), havocbot_ai(), havocbot_movetogoal(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), IMPULSE(), Item_GiveTo(), M_Wyvern_Attack_Fireball(), Monster_Remove(), Monster_Think(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_ammo_touch(), NIX_GiveCurrentWeapon(), ObserverOrSpectatorThink(), OffhandHook::offhand_think(), PlayerDamage(), PlayerPreThink(), PlayerThink(), PM_check_hitground(), PM_ClientMovement_UpdateStatus(), Portal_Think(), PutObserverInServer(), PutPlayerInServer(), racer_frame(), raptor_frame(), REGISTER_MUTATOR(), RemoveGrapplingHooks(), REPLICATE_APPLYCHANGE(), Reset_ArcBeam(), reset_map(), SetSpectatee(), spawn_held_nade(), spiderbot_frame(), TEST(), Turret::tr_attack(), trigger_magicear_processmessage(), turret_initialize(), vehicles_enter(), vehicles_exit(), vehicles_spawn(), W_Devastator_Unregister(), W_DualWielding(), W_GunAlign(), W_ResetGunAlign(), W_WeaponFrame(), weapon_byid_handle(), weapon_group_handle(), weapon_prepareattack_do(), weaponslot(), and X().
| string weaponorder_byid |
Definition at line 267 of file weapon.qh.
Referenced by STATIC_INIT(), W_NextWeapon(), and W_PreviousWeapon().
weapon pierces and causes bleeding (used for damage effects)
Definition at line 262 of file weapon.qh.
Referenced by DamageEffect().
weapon can be dual wielded
Definition at line 259 of file weapon.qh.
Referenced by client_hasweapon(), and W_WeaponFrame().
hides from menu
Definition at line 253 of file weapon.qh.
Referenced by GiveItems(), Scoreboard_AccuracyAndItemStats_Draw(), STATIC_INIT(), STATIC_INIT(), want_weapon(), Weapon_whereis(), weapons_all(), Weapons_Draw(), weapons_extended(), weapons_standard(), and XonoticMutatorWeaponArenaTab_fill().
hides from impulse 99 etc. (mutators are allowed to clear this flag)
Definition at line 256 of file weapon.qh.
Referenced by Dump_Weapon_Settings(), GiveItems(), HUD_Weapons(), Item_RandomFromList(), NIX_CanChooseWeapon(), RandomItems_GetRandomVanillaItemClassName(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), Scoreboard_AccuracyAndItemStats_Draw(), STATIC_INIT(), want_weapon(), weapon_defaultspawnfunc(), weapons_all(), Weapons_Draw(), weapons_standard(), and XonoticWeaponsList_drawListBoxItem().
in "most weapons" set
Definition at line 252 of file weapon.qh.
Referenced by NIX_CanChooseWeapon(), want_weapon(), and weapons_standard().
weapon doesn't aim directly at targets
Definition at line 263 of file weapon.qh.
Referenced by TrueAimCheck().
weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
Definition at line 261 of file weapon.qh.
Referenced by W_SetupShot_Dir_ProjectileSize_Range().
can has reload
Definition at line 254 of file weapon.qh.
Referenced by havocbot_ai(), NIX_GiveCurrentWeapon(), PutPlayerInServer(), W_Reload(), and W_WeaponFrame().
special attack (not a true weapon); NOTE: if this flag is set then WEP_FLAG_HIDDEN must be set as well
Definition at line 264 of file weapon.qh.
Referenced by Dump_Weapon_Settings(), fixPriorityList(), STATIC_INIT(), and STATIC_INIT().
powerup timer
Definition at line 255 of file weapon.qh.
Referenced by spritelookupblinkvalue(), startsWith(), STATIC_INIT(), weapon_defaultspawnfunc(), and weapons_extended().
primary attack is melee swing (for animation)
Definition at line 257 of file weapon.qh.
Referenced by nade_damage(), and weapon_thinkf().
secondary attack is melee swing (for animation)
Definition at line 258 of file weapon.qh.
Referenced by nade_damage(), and weapon_thinkf().
not for damaging people
Definition at line 248 of file weapon.qh.
Referenced by Scoreboard_AccuracyAndItemStats_Draw(), Scoreboard_AccuracyStats_Draw(), and STATIC_INIT().
| const int WS_CLEAR = 0 |
no weapon selected
Definition at line 29 of file weapon.qh.
Referenced by viewmodel_draw(), w_enddrop(), and W_WeaponFrame().
| const int WS_DROP = 2 |
deselecting frame
Definition at line 31 of file weapon.qh.
Referenced by NET_HANDLE(), viewmodel_draw(), and W_WeaponFrame().
| const int WS_INUSE = 3 |
fire state
Definition at line 32 of file weapon.qh.
Referenced by W_Hagar_Attack2_Load(), W_WeaponFrame(), and weapon_prepareattack_do().
| const int WS_RAISE = 1 |
raise frame
Definition at line 30 of file weapon.qh.
Referenced by NET_HANDLE(), viewmodel_draw(), W_WeaponFrame(), and weapon_thinkf().
| const int WS_READY = 4 |
idle frame
Definition at line 33 of file weapon.qh.
Referenced by bot_cmd_debug_assert_canfire(), DropBall(), GiveBall(), W_Hagar_Attack2_Load(), w_ready(), W_Reload(), W_ThrowWeapon(), W_WeaponFrame(), and weapon_prepareattack_check().