Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
NullWeapon Class Reference
Inheritance diagram for NullWeapon:
Collaboration diagram for NullWeapon:

Public Member Functions

 ATTRIB (Weapon, m_canonical_spawnfunc, string)
 the canonical spawnfunc name
 ATTRIB (Weapon, m_model, entity)
 M: model MDL_id_ITEM.
 ATTRIB (Weapon, m_muzzleeffect, entity)
 M: flash effect EFFECT_id_MUZZLEFLASH.
 ATTRIB (Weapon, m_pickup, entity)
virtual void describe ()
virtual void m_spawnfunc_hookreplace ()
 control what happens when this weapon is spawned
virtual void wr_aim ()
 (SERVER) runs bot aiming code for this weapon
virtual void wr_checkammo1 ()
 (SERVER) checks ammo for weapon primary
virtual void wr_checkammo2 ()
 (SERVER) checks ammo for weapon second
virtual void wr_config ()
 (SERVER) dump weapon cvars to config in data directory (see: sv_cmd dumpweapons)
virtual void wr_drop ()
 (SERVER) the weapon is dropped
virtual void wr_glow ()
 (BOTH) weapon specific glow
virtual void wr_gonethink ()
 (SERVER) logic to run when weapon is lost
virtual void wr_impacteffect ()
 (CLIENT) impact effect for weapon explosion
virtual void wr_init ()
 (BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
virtual void wr_killmessage ()
 (SERVER) notification number for kill message (may inspect w_deathtype for details)
virtual void wr_pickup ()
 (SERVER) a weapon is picked up
virtual void wr_playerdeath ()
 (SERVER) called whenever a player dies
virtual void wr_reload ()
 (SERVER) handles reloading for weapon
virtual void wr_resetplayer ()
 (SERVER) clears fields that the weapon may use
virtual void wr_setup ()
 (SERVER) setup weapon data
virtual void wr_suicidemessage ()
 (SERVER) notification number for suicide message (may inspect w_deathtype for details)
virtual void wr_think ()
 (SERVER) logic to run every frame
virtual void wr_update ()
 (SERVER) update cvar based properties
virtual void wr_viewmodel ()
 (CLIENT) weapon specific view model
virtual void wr_zoom ()
 (BOTH) weapon specific zoom reticle
virtual void wr_zoomdir ()
 (CLIENT) check whether the weapon should zoom (special handling)

Public Attributes

Resource ammo_type = RES_NONE
 M: ammotype : main ammo type.
float bot_pickupbasevalue = 0
 M: rating : bot weapon priority.
int impulse = -1
 M: impulse : weapon impulse.
vector m_color = '0 0 0'
 M: color : waypointsprite color.
string m_deprecated_netname = ""
 M: deprecated refname : old reference name for compatibility with weapons that were renamed.
bool m_hidden = true
int m_id = 0
entity m_muzzlemodel = MDL_Null
 M: flash model MDL_id_MUZZLEFLASH.
string m_name = "AOL CD Thrower"
 M: wepname : human readable name.
string mdl = ""
 M: modelname : name of model (without g_ v_ or h_ prefixes)
string model2 = ""
 M: wepimg : "weaponfoobar" side view image file of weapon.
string netname = ""
 M: refname : reference name name.
int spawnflags = 0
 M: flags : WEPSPAWNFLAG_... combined.
string w_crosshair = "gfx/crosshairmoustache"
 M: crosshair : per-weapon crosshair: "CrosshairImage Size".
float w_crosshair_size = 1
 A: crosshair : per-weapon crosshair size (argument two of "crosshair" field)
string w_reticle = string_null
 A: reticle : per-weapon zoom reticle.

Detailed Description

Definition at line 138 of file all.qh.

Member Function Documentation

◆ ATTRIB() [1/4]

Weapon::ATTRIB ( Weapon ,
m_canonical_spawnfunc ,
string  )
inherited

the canonical spawnfunc name

References ATTRIB().

Referenced by ATTRIB().

◆ ATTRIB() [2/4]

Weapon::ATTRIB ( Weapon ,
m_model ,
entity  )
inherited

M: model MDL_id_ITEM.

References entity().

◆ ATTRIB() [3/4]

Weapon::ATTRIB ( Weapon ,
m_muzzleeffect ,
entity  )
inherited

M: flash effect EFFECT_id_MUZZLEFLASH.

References entity().

◆ ATTRIB() [4/4]

Weapon::ATTRIB ( Weapon ,
m_pickup ,
entity  )
inherited

References entity().

◆ describe()

virtual void Weapon::describe ( )
inlinevirtualinherited

Definition at line 133 of file weapon.qh.

134 {
135 TC(Weapon, this);
136 return SUPER(Weapon).describe(this);
137 }
#define TC(T, sym)
Definition _all.inc:82
#define SUPER(cname)
Definition oo.qh:231

References describe(), SUPER, and TC.

Referenced by describe().

◆ m_spawnfunc_hookreplace()

virtual void Weapon::m_spawnfunc_hookreplace ( )
inlinevirtualinherited

control what happens when this weapon is spawned

Definition at line 49 of file weapon.qh.

49{ return this; }

References entity(), m_spawnfunc_hookreplace(), METHOD, and this.

Referenced by m_spawnfunc_hookreplace(), and weapon_defaultspawnfunc().

◆ wr_aim()

virtual void Weapon::wr_aim ( )
inlinevirtualinherited

(SERVER) runs bot aiming code for this weapon

Definition at line 96 of file weapon.qh.

96{}

References entity(), and wr_aim().

Referenced by havocbot_ai(), and wr_aim().

◆ wr_checkammo1()

◆ wr_checkammo2()

virtual void Weapon::wr_checkammo2 ( )
inlinevirtualinherited

(SERVER) checks ammo for weapon second

Definition at line 94 of file weapon.qh.

94{return false;}

References entity(), and wr_checkammo2().

Referenced by client_hasweapon(), W_Hagar_Attack2_Load(), W_MachineGun_Attack_Frame(), W_Shotgun_Attack3_Frame1(), W_Shotgun_Attack3_Frame2(), weapon_prepareattack_checkammo(), and wr_checkammo2().

◆ wr_config()

virtual void Weapon::wr_config ( )
inlinevirtualinherited

(SERVER) dump weapon cvars to config in data directory (see: sv_cmd dumpweapons)

Definition at line 114 of file weapon.qh.

114{}

References wr_config().

Referenced by wr_config().

◆ wr_drop()

virtual void Weapon::wr_drop ( )
inlinevirtualinherited

(SERVER) the weapon is dropped

Definition at line 127 of file weapon.qh.

127{}

References entity(), and wr_drop().

Referenced by wr_drop().

◆ wr_glow()

virtual void Weapon::wr_glow ( )
inlinevirtualinherited

(BOTH) weapon specific glow

Definition at line 125 of file weapon.qh.

125{ return '0 0 0'; }

References entity(), and wr_glow().

Referenced by weaponentity_glowmod(), and wr_glow().

◆ wr_gonethink()

virtual void Weapon::wr_gonethink ( )
inlinevirtualinherited

(SERVER) logic to run when weapon is lost

Definition at line 112 of file weapon.qh.

112{}

References entity(), and wr_gonethink().

Referenced by W_WeaponFrame(), and wr_gonethink().

◆ wr_impacteffect()

virtual void Weapon::wr_impacteffect ( )
inlinevirtualinherited

(CLIENT) impact effect for weapon explosion

Definition at line 108 of file weapon.qh.

108{}

References entity(), and wr_impacteffect().

Referenced by NET_HANDLE(), and wr_impacteffect().

◆ wr_init()

virtual void Weapon::wr_init ( )
inlinevirtualinherited

(BOTH) precaches models/sounds used by this weapon, also sets up weapon properties

Definition at line 98 of file weapon.qh.

98{}

References wr_init().

Referenced by PRECACHE(), weapon_defaultspawnfunc(), and wr_init().

◆ wr_killmessage()

virtual void Weapon::wr_killmessage ( )
inlinevirtualinherited

(SERVER) notification number for kill message (may inspect w_deathtype for details)

Definition at line 102 of file weapon.qh.

102{return NULL;}
#define NULL
Definition post.qh:14

References NULL, and wr_killmessage().

Referenced by Obituary_WeaponDeath(), and wr_killmessage().

◆ wr_pickup()

virtual void Weapon::wr_pickup ( )
inlinevirtualinherited

(SERVER) a weapon is picked up

Definition at line 129 of file weapon.qh.

129{}

References entity(), and wr_pickup().

Referenced by wr_pickup().

◆ wr_playerdeath()

virtual void Weapon::wr_playerdeath ( )
inlinevirtualinherited

(SERVER) called whenever a player dies

Definition at line 110 of file weapon.qh.

110{}

References entity(), and wr_playerdeath().

Referenced by PlayerDamage(), and wr_playerdeath().

◆ wr_reload()

virtual void Weapon::wr_reload ( )
inlinevirtualinherited

(SERVER) handles reloading for weapon

Definition at line 104 of file weapon.qh.

104{}

References entity(), and wr_reload().

Referenced by IMPULSE(), W_SwitchWeapon(), and wr_reload().

◆ wr_resetplayer()

virtual void Weapon::wr_resetplayer ( )
inlinevirtualinherited

(SERVER) clears fields that the weapon may use

Definition at line 106 of file weapon.qh.

106{}

References entity(), and wr_resetplayer().

Referenced by GiveBall(), MUTATOR_HOOKFUNCTION(), and wr_resetplayer().

◆ wr_setup()

virtual void Weapon::wr_setup ( )
inlinevirtualinherited

(SERVER) setup weapon data

Definition at line 88 of file weapon.qh.

88{}

References entity(), and wr_setup().

Referenced by W_WeaponFrame(), and wr_setup().

◆ wr_suicidemessage()

virtual void Weapon::wr_suicidemessage ( )
inlinevirtualinherited

(SERVER) notification number for suicide message (may inspect w_deathtype for details)

Definition at line 100 of file weapon.qh.

100{return NULL;}

References NULL, and wr_suicidemessage().

Referenced by Obituary_WeaponDeath(), and wr_suicidemessage().

◆ wr_think()

virtual void Weapon::wr_think ( )
inlinevirtualinherited

(SERVER) logic to run every frame

Definition at line 90 of file weapon.qh.

90{}

References entity(), and wr_think().

Referenced by M_Mage_Attack(), M_Spider_Attack(), M_Wyvern_Attack_Fireball(), OffhandHook::offhand_think(), racer_frame(), raptor_frame(), Turret::tr_attack(), W_WeaponFrame(), and wr_think().

◆ wr_update()

virtual void Weapon::wr_update ( )
inlinevirtualinherited

(SERVER) update cvar based properties

Definition at line 131 of file weapon.qh.

131{}

References wr_update().

Referenced by wr_update().

◆ wr_viewmodel()

virtual void Weapon::wr_viewmodel ( )
inlinevirtualinherited

(CLIENT) weapon specific view model

Definition at line 123 of file weapon.qh.

123{ return string_null; }
string string_null
Definition nil.qh:9

References entity(), string_null, and wr_viewmodel().

Referenced by viewmodel_draw(), and wr_viewmodel().

◆ wr_zoom()

virtual void Weapon::wr_zoom ( )
inlinevirtualinherited

(BOTH) weapon specific zoom reticle

Definition at line 116 of file weapon.qh.

116 {
117 // no weapon specific image for this weapon
118 return false;
119 }

References entity(), and wr_zoom().

Referenced by DrawReticle(), PlayerPreThink(), and wr_zoom().

◆ wr_zoomdir()

virtual void Weapon::wr_zoomdir ( )
inlinevirtualinherited

(CLIENT) check whether the weapon should zoom (special handling)

Definition at line 121 of file weapon.qh.

121{return false;}

References wr_zoomdir().

Referenced by IsZooming(), and wr_zoomdir().

Member Data Documentation

◆ ammo_type

◆ bot_pickupbasevalue

float Weapon::bot_pickupbasevalue = 0
inherited

M: rating : bot weapon priority.

Definition at line 57 of file weapon.qh.

Referenced by WeaponPickup::WeaponPickup().

◆ impulse

int Weapon::impulse = -1
inherited

M: impulse : weapon impulse.

Definition at line 53 of file weapon.qh.

Referenced by client_hasweapon(), W_FixWeaponOrder_BuildImpulseList_cmp(), W_Guide_Keybinds(), and W_SwitchWeapon_TryOthers().

◆ m_color

vector Weapon::m_color = '0 0 0'
inherited

M: color : waypointsprite color.

previously called "wpcolor"

Definition at line 59 of file weapon.qh.

Referenced by DamageText::DamageText_draw2d(), and weapon_defaultspawnfunc().

◆ m_deprecated_netname

string Weapon::m_deprecated_netname = ""
inherited

M: deprecated refname : old reference name for compatibility with weapons that were renamed.

Definition at line 83 of file weapon.qh.

◆ m_hidden

bool NullWeapon::m_hidden = true

Definition at line 139 of file all.qh.

◆ m_id

◆ m_muzzlemodel

entity Weapon::m_muzzlemodel = MDL_Null
inherited

M: flash model MDL_id_MUZZLEFLASH.

Definition at line 66 of file weapon.qh.

Referenced by W_MuzzleFlash().

◆ m_name

string Weapon::m_name = "AOL CD Thrower"
inherited

M: wepname : human readable name.

Definition at line 81 of file weapon.qh.

Referenced by WeaponPickup::WeaponPickup(), and translate_weaponarena().

◆ mdl

string Weapon::mdl = ""
inherited

M: modelname : name of model (without g_ v_ or h_ prefixes)

Definition at line 61 of file weapon.qh.

Referenced by viewmodel_draw(), and W_WeaponFrame().

◆ model2

string Weapon::model2 = ""
inherited

M: wepimg : "weaponfoobar" side view image file of weapon.

WEAPONTODO: Move out of skin files, move to common files

Definition at line 77 of file weapon.qh.

◆ netname

string Weapon::netname = ""
inherited

M: refname : reference name name.

Definition at line 79 of file weapon.qh.

Referenced by Obituary_WeaponDeath(), readplayerstartcvars(), W_DecreaseAmmo(), W_Guide_Keybinds(), and weapon_defaultspawnfunc().

◆ spawnflags

int Weapon::spawnflags = 0
inherited

M: flags : WEPSPAWNFLAG_... combined.

Definition at line 55 of file weapon.qh.

Referenced by client_hasweapon(), W_SetupShot_Dir_ProjectileSize_Range(), W_WeaponFrame(), and weapon_defaultspawnfunc().

◆ w_crosshair

string Weapon::w_crosshair = "gfx/crosshairmoustache"
inherited

M: crosshair : per-weapon crosshair: "CrosshairImage Size".

Definition at line 71 of file weapon.qh.

◆ w_crosshair_size

float Weapon::w_crosshair_size = 1
inherited

A: crosshair : per-weapon crosshair size (argument two of "crosshair" field)

Definition at line 73 of file weapon.qh.

◆ w_reticle

string Weapon::w_reticle = string_null
inherited

A: reticle : per-weapon zoom reticle.

Definition at line 75 of file weapon.qh.

Referenced by DrawReticle().


The documentation for this class was generated from the following file: