Xonotic
MachineGun Class Reference
+ Inheritance diagram for MachineGun:
+ Collaboration diagram for MachineGun:

Public Member Functions

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

Public Attributes

Resource ammo_type = RES_BULLETS
 
float bot_pickupbasevalue = 7000
 
int impulse = 3
 
string m_canonical_spawnfunc = "weapon_machinegun"
 
int m_id = 0
 
string m_name = _("MachineGun")
 
string mdl = "uzi"
 
string model2 = "weaponuzi"
 
string netname = "machinegun"
 
int spawnflags = WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_BLEED
 
string w_crosshair = "gfx/crosshairuzi"
 
float w_crosshair_size = 0.6
 
string w_reticle = string_null
 A: reticle : per-weapon zoom reticle. More...
 
vector wpcolor = '1 1 0'
 

Detailed Description

Definition at line 3 of file machinegun.qh.

Member Function Documentation

◆ ATTRIB() [1/2]

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

the canonical spawnfunc name

◆ ATTRIB() [2/2]

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

◆ Weapon ::display()

virtual void Weapon::Weapon ::display ( )
inlinevirtualinherited

Definition at line 127 of file weapon.qh.

References cvar_string(), ENDCLASS, entity(), m_name, string_null, and weapon_defaultspawnfunc().

127  {
128  returns(this.m_name, this.model2 ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.model2) : string_null);
129  }
string string_null
Definition: nil.qh:9
string m_name
M: wepname : human readable name.
Definition: weapon.qh:78
string model2
M: wepimg : "weaponfoobar" side view image file of weapon.
Definition: weapon.qh:74
+ Here is the call graph for this function:

◆ Weapon ::m_spawnfunc_hookreplace()

virtual void Weapon::Weapon ::m_spawnfunc_hookreplace ( )
inlinevirtualinherited

control what happens when this weapon is spawned

Definition at line 46 of file weapon.qh.

46 { return this; }

◆ Weapon ::wr_aim()

virtual void Weapon::Weapon ::wr_aim ( )
inlinevirtualinherited

(SERVER) runs bot aiming code for this weapon

Definition at line 91 of file weapon.qh.

91 {}

◆ Weapon ::wr_checkammo1()

virtual void Weapon::Weapon ::wr_checkammo1 ( )
inlinevirtualinherited

(SERVER) checks ammo for weapon primary

Definition at line 87 of file weapon.qh.

87 {return false;}

◆ Weapon ::wr_checkammo2()

virtual void Weapon::Weapon ::wr_checkammo2 ( )
inlinevirtualinherited

(SERVER) checks ammo for weapon second

Definition at line 89 of file weapon.qh.

89 {return false;}

◆ Weapon ::wr_config()

virtual void Weapon::Weapon ::wr_config ( )
inlinevirtualinherited

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

Definition at line 109 of file weapon.qh.

109 {}

◆ Weapon ::wr_drop()

virtual void Weapon::Weapon ::wr_drop ( )
inlinevirtualinherited

(SERVER) the weapon is dropped

Definition at line 122 of file weapon.qh.

122 {}

◆ Weapon ::wr_glow()

virtual void Weapon::Weapon ::wr_glow ( )
inlinevirtualinherited

(BOTH) weapon specific glow

Definition at line 120 of file weapon.qh.

120 { return '0 0 0'; }

◆ Weapon ::wr_gonethink()

virtual void Weapon::Weapon ::wr_gonethink ( )
inlinevirtualinherited

(SERVER) logic to run when weapon is lost

Definition at line 107 of file weapon.qh.

107 {}

◆ Weapon ::wr_impacteffect()

virtual void Weapon::Weapon ::wr_impacteffect ( )
inlinevirtualinherited

(CLIENT) impact effect for weapon explosion

Definition at line 103 of file weapon.qh.

103 {}

◆ Weapon ::wr_init()

virtual void Weapon::Weapon ::wr_init ( )
inlinevirtualinherited

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

Definition at line 93 of file weapon.qh.

93 {}

◆ Weapon ::wr_killmessage()

virtual void Weapon::Weapon ::wr_killmessage ( )
inlinevirtualinherited

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

Definition at line 97 of file weapon.qh.

References NULL.

97 {return NULL;}
#define NULL
Definition: post.qh:17

◆ Weapon ::wr_pickup()

virtual void Weapon::Weapon ::wr_pickup ( )
inlinevirtualinherited

(SERVER) a weapon is picked up

Definition at line 124 of file weapon.qh.

124 {}

◆ Weapon ::wr_playerdeath()

virtual void Weapon::Weapon ::wr_playerdeath ( )
inlinevirtualinherited

(SERVER) called whenever a player dies

Definition at line 105 of file weapon.qh.

105 {}

◆ Weapon ::wr_reload()

virtual void Weapon::Weapon ::wr_reload ( )
inlinevirtualinherited

(SERVER) handles reloading for weapon

Definition at line 99 of file weapon.qh.

99 {}

◆ Weapon ::wr_resetplayer()

virtual void Weapon::Weapon ::wr_resetplayer ( )
inlinevirtualinherited

(SERVER) clears fields that the weapon may use

Definition at line 101 of file weapon.qh.

101 {}

◆ Weapon ::wr_setup()

virtual void Weapon::Weapon ::wr_setup ( )
inlinevirtualinherited

(SERVER) setup weapon data

Definition at line 83 of file weapon.qh.

83 {}

◆ Weapon ::wr_suicidemessage()

virtual void Weapon::Weapon ::wr_suicidemessage ( )
inlinevirtualinherited

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

Definition at line 95 of file weapon.qh.

References NULL.

95 {return NULL;}
#define NULL
Definition: post.qh:17

◆ Weapon ::wr_think()

virtual void Weapon::Weapon ::wr_think ( )
inlinevirtualinherited

(SERVER) logic to run every frame

Definition at line 85 of file weapon.qh.

85 {}

◆ Weapon ::wr_update()

virtual void Weapon::Weapon ::wr_update ( )
inlinevirtualinherited

(SERVER) update cvar based properties

Definition at line 126 of file weapon.qh.

126 {}

◆ Weapon ::wr_viewmodel()

virtual void Weapon::Weapon ::wr_viewmodel ( )
inlinevirtualinherited

(CLIENT) weapon specific view model

Definition at line 118 of file weapon.qh.

References string_null.

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

◆ Weapon ::wr_zoom()

virtual void Weapon::Weapon ::wr_zoom ( )
inlinevirtualinherited

(BOTH) weapon specific zoom reticle

Definition at line 111 of file weapon.qh.

111  {
112  // no weapon specific image for this weapon
113  return false;
114  }

◆ Weapon ::wr_zoomdir()

virtual void Weapon::Weapon ::wr_zoomdir ( )
inlinevirtualinherited

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

Definition at line 116 of file weapon.qh.

116 {return false;}

Member Data Documentation

◆ ammo_type

Resource MachineGun::ammo_type = RES_BULLETS

Definition at line 5 of file machinegun.qh.

◆ bot_pickupbasevalue

float MachineGun::bot_pickupbasevalue = 7000

Definition at line 8 of file machinegun.qh.

◆ impulse

int MachineGun::impulse = 3

Definition at line 6 of file machinegun.qh.

◆ m_canonical_spawnfunc

string MachineGun::m_canonical_spawnfunc = "weapon_machinegun"

Definition at line 4 of file machinegun.qh.

◆ m_id

◆ m_name

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

Definition at line 20 of file machinegun.qh.

◆ mdl

string MachineGun::mdl = "uzi"

Definition at line 10 of file machinegun.qh.

◆ model2

string MachineGun::model2 = "weaponuzi"

Definition at line 18 of file machinegun.qh.

◆ netname

string MachineGun::netname = "machinegun"

Definition at line 19 of file machinegun.qh.

◆ spawnflags

Definition at line 7 of file machinegun.qh.

◆ w_crosshair

string MachineGun::w_crosshair = "gfx/crosshairuzi"

Definition at line 16 of file machinegun.qh.

◆ w_crosshair_size

float MachineGun::w_crosshair_size = 0.6

Definition at line 17 of file machinegun.qh.

◆ w_reticle

string Weapon::w_reticle = string_null
inherited

A: reticle : per-weapon zoom reticle.

Definition at line 72 of file weapon.qh.

Referenced by DrawReticle().

◆ wpcolor

vector MachineGun::wpcolor = '1 1 0'

Definition at line 9 of file machinegun.qh.


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