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

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_ROCKETS
float bot_pickupbasevalue = 7000
int impulse = 4
string m_canonical_spawnfunc = "weapon_mortar"
vector m_color = '0.988 0.392 0.314'
string m_deprecated_netname = "grenadelauncher"
int m_id = 0
Model m_model = MDL_MORTAR_ITEM
entity m_muzzleeffect = EFFECT_GRENADE_MUZZLEFLASH
Model m_muzzlemodel = MDL_Null
string m_name = _("Mortar")
string mdl = "gl"
string model2 = "weapongrenadelauncher"
string netname = "mortar"
int spawnflags = WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NOTRUEAIM
string w_crosshair = "gfx/crosshairgrenadelauncher"
float w_crosshair_size = 0.7
string w_reticle = string_null
 A: reticle : per-weapon zoom reticle.

Detailed Description

Definition at line 14 of file mortar.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

Resource Mortar::ammo_type = RES_ROCKETS

Definition at line 16 of file mortar.qh.

◆ bot_pickupbasevalue

float Mortar::bot_pickupbasevalue = 7000

Definition at line 19 of file mortar.qh.

◆ impulse

int Mortar::impulse = 4

Definition at line 17 of file mortar.qh.

◆ m_canonical_spawnfunc

string Mortar::m_canonical_spawnfunc = "weapon_mortar"

Definition at line 15 of file mortar.qh.

◆ m_color

vector Mortar::m_color = '0.988 0.392 0.314'

Definition at line 20 of file mortar.qh.

◆ m_deprecated_netname

string Mortar::m_deprecated_netname = "grenadelauncher"

Definition at line 32 of file mortar.qh.

◆ m_id

◆ m_model

Model Mortar::m_model = MDL_MORTAR_ITEM

Definition at line 23 of file mortar.qh.

◆ m_muzzleeffect

entity Mortar::m_muzzleeffect = EFFECT_GRENADE_MUZZLEFLASH

Definition at line 25 of file mortar.qh.

◆ m_muzzlemodel

Model Mortar::m_muzzlemodel = MDL_Null

Definition at line 24 of file mortar.qh.

◆ m_name

string Mortar::m_name = _("Mortar")

Definition at line 31 of file mortar.qh.

◆ mdl

string Mortar::mdl = "gl"

Definition at line 21 of file mortar.qh.

◆ model2

string Mortar::model2 = "weapongrenadelauncher"

Definition at line 29 of file mortar.qh.

◆ netname

string Mortar::netname = "mortar"

Definition at line 30 of file mortar.qh.

◆ spawnflags

Definition at line 18 of file mortar.qh.

◆ w_crosshair

string Mortar::w_crosshair = "gfx/crosshairgrenadelauncher"

Definition at line 27 of file mortar.qh.

◆ w_crosshair_size

float Mortar::w_crosshair_size = 0.7

Definition at line 28 of file mortar.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: