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

Public Member Functions

 WeaponPickup (Weapon w)
 ATTRIB (GameItem, m_canonical_spawnfunc, string)
 the canonical spawnfunc name
 ATTRIB (GameItem, m_icon, string)
 ATTRIB (GameItem, m_name, string)
 ATTRIB (GameItem, m_waypoint, string)
 ATTRIB (Pickup, m_iteminit, void(Pickup this, entity item))
 ATTRIB (Pickup, m_model, Model)
 ATTRIB (Pickup, m_name, string)
 ATTRIB (Pickup, m_pickupanyway, bool)
 ATTRIB (Pickup, m_respawntime, float)
 ATTRIB (Pickup, m_respawntimejitter, float)
 ATTRIB (Pickup, m_skin, int)
 ATTRIB (Pickup, netname, string)
 ATTRIB (WeaponPickup, m_name, string)
 ATTRIB (WeaponPickup, m_weapon, Weapon)
virtual void describe ()
 float (entity player, entity item) m_pickupevalfunc
float generic_pickupevalfunc (entity player, entity item)
virtual void giveTo ()
float Item_GiveTo (entity item, entity player)
void ITEM_HANDLE (Show, GameItem this)
bool ITEM_HANDLE (Pickup, Pickup this, entity item, entity player)
virtual void m_spawnfunc_hookreplace ()
virtual void show ()
float weapon_pickupevalfunc (entity player, entity item)

Public Attributes

int m_botvalue = 0
vector m_color = '1 1 1'
bool m_glow = false
int m_id = 0
int m_itemflags = FL_WEAPON
int m_itemid = 0
vector m_maxs = ITEM_D_MAXS
vector m_mins = ITEM_D_MINS
Sound m_respawnsound = SND_ITEMRESPAWN
Sound m_sound = SND_WEAPONPICKUP
int m_waypointblink = 1

Detailed Description

Definition at line 160 of file weapon.qh.

Constructor & Destructor Documentation

◆ WeaponPickup()

WeaponPickup::WeaponPickup ( Weapon w)
inline

Definition at line 171 of file weapon.qh.

171 {
173 this.m_weapon = w;
174 this.m_name = w.m_name;
175#ifdef GAMEQC
176 this.m_model = w.m_model;
177#endif
178#ifdef SVQC
180#endif
181 }
int m_botvalue
Definition pickup.qh:23
WeaponPickup(Weapon w)
Definition weapon.qh:171
string m_name
M: wepname : human readable name.
Definition weapon.qh:81
float bot_pickupbasevalue
M: rating : bot weapon priority.
Definition weapon.qh:57
string m_name
Definition scores.qh:142
#define CONSTRUCT(cname,...)
Definition oo.qh:123
Weapon m_weapon
Definition wepent.qh:26

References WeaponPickup(), Weapon::bot_pickupbasevalue, CONSTRUCT, Pickup::m_botvalue, and Weapon::m_name.

Referenced by WeaponPickup(), ATTRIB(), ATTRIB(), float(), and giveTo().

Member Function Documentation

◆ ATTRIB() [1/14]

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

the canonical spawnfunc name

References ATTRIB().

Referenced by ATTRIB().

◆ ATTRIB() [2/14]

GameItem::ATTRIB ( GameItem ,
m_icon ,
string  )
inherited

◆ ATTRIB() [3/14]

GameItem::ATTRIB ( GameItem ,
m_name ,
string  )
inherited

References m_name.

◆ ATTRIB() [4/14]

GameItem::ATTRIB ( GameItem ,
m_waypoint ,
string  )
inherited

◆ ATTRIB() [5/14]

Pickup::ATTRIB ( Pickup ,
m_iteminit ,
void(Pickup this, entity item)  )
inherited

References entity().

◆ ATTRIB() [6/14]

Pickup::ATTRIB ( Pickup ,
m_model ,
Model  )
inherited

◆ ATTRIB() [7/14]

Pickup::ATTRIB ( Pickup ,
m_name ,
string  )
inherited

References m_name.

◆ ATTRIB() [8/14]

Pickup::ATTRIB ( Pickup ,
m_pickupanyway ,
bool  )
inherited

◆ ATTRIB() [9/14]

Pickup::ATTRIB ( Pickup ,
m_respawntime ,
float  )
inherited

◆ ATTRIB() [10/14]

Pickup::ATTRIB ( Pickup ,
m_respawntimejitter ,
float  )
inherited

◆ ATTRIB() [11/14]

Pickup::ATTRIB ( Pickup ,
m_skin ,
int  )
inherited

References m_skin.

◆ ATTRIB() [12/14]

Pickup::ATTRIB ( Pickup ,
netname ,
string  )
inherited

References netname.

◆ ATTRIB() [13/14]

WeaponPickup::ATTRIB ( WeaponPickup ,
m_name ,
string  )

References WeaponPickup(), ATTRIB(), and m_name.

◆ ATTRIB() [14/14]

WeaponPickup::ATTRIB ( WeaponPickup ,
m_weapon ,
Weapon  )

References WeaponPickup(), ATTRIB(), and m_weapon.

Referenced by ATTRIB(), and ATTRIB().

◆ describe()

virtual void GameItem::describe ( )
inlinevirtualinherited

Reimplemented in Powerup.

Definition at line 141 of file item.qh.

142 {
143 TC(GameItem, this);
144 return SUPER(GameItem).describe(this);
145 }
#define TC(T, sym)
Definition _all.inc:82
#define SUPER(cname)
Definition oo.qh:231

References describe(), SUPER, and TC.

Referenced by describe().

◆ float()

WeaponPickup::float ( entity player,
entity item )

◆ generic_pickupevalfunc()

float Pickup::generic_pickupevalfunc ( entity player,
entity item )
inherited

References entity().

Referenced by float().

◆ giveTo()

virtual void WeaponPickup::giveTo ( )
inlinevirtual

Reimplemented from Pickup.

Definition at line 183 of file weapon.qh.

184 {
185 bool b = Item_GiveTo(item, player);
186 //if (b) {
187 //LOG_TRACEF("entity %i picked up %s", player, this.m_name);
188 //}
189 return b;
190 }
float Item_GiveTo(entity item, entity player)

References WeaponPickup(), entity(), giveTo(), and Item_GiveTo().

Referenced by giveTo().

◆ Item_GiveTo()

float Pickup::Item_GiveTo ( entity item,
entity player )
inherited

References entity(), and giveTo().

◆ ITEM_HANDLE() [1/2]

void GameItem::ITEM_HANDLE ( Show ,
GameItem this )
inlineinherited

Definition at line 159 of file item.qh.

159{ this.show(this); }
virtual void show()
Definition item.qh:154

References show().

◆ ITEM_HANDLE() [2/2]

bool Pickup::ITEM_HANDLE ( Pickup ,
Pickup this,
entity item,
entity player )
inherited

References entity().

◆ m_spawnfunc_hookreplace()

virtual void GameItem::m_spawnfunc_hookreplace ( )
inlinevirtualinherited

Definition at line 130 of file item.qh.

130{ return this; }

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

Referenced by m_spawnfunc_hookreplace().

◆ show()

virtual void Pickup::show ( )
inlinevirtualinherited

Reimplemented from GameItem.

Definition at line 14 of file pickup.qh.

15 {
16 TC(Pickup, this);
17 LOG_INFOF("%s: %s", etos(this), this.m_name);
18 }
#define LOG_INFOF(...)
Definition log.qh:66
string etos(entity e)

References etos(), LOG_INFOF, m_name, show(), and TC.

Referenced by show().

◆ weapon_pickupevalfunc()

float WeaponPickup::weapon_pickupevalfunc ( entity player,
entity item )

References entity().

Referenced by float().

Member Data Documentation

◆ m_botvalue

int Pickup::m_botvalue = 0
inherited

Definition at line 23 of file pickup.qh.

Referenced by WeaponPickup::WeaponPickup().

◆ m_color

vector Pickup::m_color = '1 1 1'
inherited

Definition at line 13 of file pickup.qh.

◆ m_glow

bool GameItem::m_glow = false
inherited

Definition at line 137 of file item.qh.

◆ m_id

int GameItem::m_id = 0
inherited

Definition at line 127 of file item.qh.

Referenced by GetAmmoResource(), Item_ItemsTime_SetTime(), and NET_HANDLE().

◆ m_itemflags

int WeaponPickup::m_itemflags = FL_WEAPON

Definition at line 167 of file weapon.qh.

◆ m_itemid

int Pickup::m_itemid = 0
inherited

Definition at line 19 of file pickup.qh.

◆ m_maxs

vector Pickup::m_maxs = ITEM_D_MAXS
inherited

Definition at line 22 of file pickup.qh.

◆ m_mins

vector Pickup::m_mins = ITEM_D_MINS
inherited

Definition at line 21 of file pickup.qh.

◆ m_respawnsound

Sound GameItem::m_respawnsound = SND_ITEMRESPAWN
inherited

Definition at line 138 of file item.qh.

◆ m_sound

Sound WeaponPickup::m_sound = SND_WEAPONPICKUP

Definition at line 164 of file weapon.qh.

◆ m_waypointblink

int GameItem::m_waypointblink = 1
inherited

Definition at line 135 of file item.qh.


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