142 returns(this.
m_name, icon_path_from_HUDskin(this.
model2));
150#define SPAWNFUNC_WEAPON(name, weapon) \
151 spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
155#define SPAWNFUNC_WEAPON(name, weapon)
176 this.m_model = w.m_model;
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
virtual void offhand_think()
ATTRIB(WeaponPickup, m_weapon, Weapon)
float weapon_pickupevalfunc(entity player, entity item)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
int impulse
M: impulse : weapon impulse.
virtual void wr_suicidemessage()
(SERVER) notification number for suicide message (may inspect w_deathtype for details)
virtual void wr_setup()
(SERVER) setup weapon data
virtual void wr_reload()
(SERVER) handles reloading for weapon
virtual void m_spawnfunc_hookreplace()
control what happens when this weapon is spawned
virtual void wr_think()
(SERVER) logic to run every frame
Resource ammo_type
M: ammotype : main ammo type.
string m_name
M: wepname : human readable name.
virtual void wr_impacteffect()
(CLIENT) impact effect for weapon explosion
virtual void wr_update()
(SERVER) update cvar based properties
ATTRIB(Weapon, m_pickup, entity)
virtual void wr_playerdeath()
(SERVER) called whenever a player dies
string w_crosshair
M: crosshair : per-weapon crosshair: "CrosshairImage Size".
vector m_color
M: color : waypointsprite color.
virtual void wr_glow()
(BOTH) weapon specific glow
virtual void wr_drop()
(SERVER) the weapon is dropped
string mdl
M: modelname : name of model (without g_ v_ or h_ prefixes)
ATTRIB(Weapon, m_canonical_spawnfunc, string)
the canonical spawnfunc name
virtual void wr_aim()
(SERVER) runs bot aiming code for this weapon
virtual void wr_checkammo2()
(SERVER) checks ammo for weapon second
string netname
M: refname : reference name name.
virtual void wr_zoomdir()
(CLIENT) check whether the weapon should zoom (special handling)
virtual void wr_killmessage()
(SERVER) notification number for kill message (may inspect w_deathtype for details)
ATTRIB(Weapon, m_model, entity)
M: model MDL_id_ITEM.
virtual void wr_zoom()
(BOTH) weapon specific zoom reticle
int spawnflags
M: flags : WEPSPAWNFLAG_... combined.
virtual void wr_pickup()
(SERVER) a weapon is picked up
virtual void wr_init()
(BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
float w_crosshair_size
A: crosshair : per-weapon crosshair size (argument two of "crosshair" field)
virtual void wr_checkammo1()
(SERVER) checks ammo for weapon primary
ATTRIB(Weapon, m_muzzleeffect, entity)
M: flash effect EFFECT_id_MUZZLEFLASH.
virtual void wr_gonethink()
(SERVER) logic to run when weapon is lost
string model2
M: wepimg : "weaponfoobar" side view image file of weapon.
virtual void wr_config()
(SERVER) dump weapon cvars to config in data directory (see: sv_cmd dumpweapons)
entity m_muzzlemodel
M: flash model MDL_id_MUZZLEFLASH.
string m_deprecated_netname
M: deprecated refname : old reference name for compatibility with weapons that were renamed.
string w_reticle
A: reticle : per-weapon zoom reticle.
virtual void wr_viewmodel()
(CLIENT) weapon specific view model
float bot_pickupbasevalue
M: rating : bot weapon priority.
virtual void wr_resetplayer()
(SERVER) clears fields that the weapon may use
#define METHOD(cname, name, prototype)
#define CONSTRUCTOR(cname,...)
#define CONSTRUCT(cname,...)
bool Item_GiveTo(entity item, entity player)
const int WEP_FLAG_CANCLIMB
const int MAX_WEAPONSLOTS
const int WEP_FLAG_RELOADABLE
const int WEP_FLAG_NOTRUEAIM
const int WEP_TYPE_HITSCAN
const int WS_READY
idle frame
void weapon_defaultspawnfunc(entity this, Weapon e)
const int WEP_TYPE_MELEE_PRI
const int WEP_TYPE_SPLASH
entity weaponentities[MAX_WEAPONSLOTS]
const int WS_CLEAR
no weapon selected
int autocvar_cl_tracers_teamcolor
const int WS_RAISE
raise frame
const int WEP_FLAG_SUPERWEAPON
const int WS_INUSE
fire state
const int WEP_FLAG_MUTATORBLOCKED
const int WEP_FLAG_DUALWIELD
const int WEP_TYPE_MELEE_SEC
const int WEP_FLAG_PENETRATEWALLS
int weaponslot(.entity weaponentity)
const int WEP_FLAG_NODUAL
const int WEP_FLAG_HIDDEN
const int WS_DROP
deselecting frame
const int WEP_FLAG_NORMAL
const int WEP_FLAG_SPECIALATTACK