weapon Struct Reference

#include <weapon.h>

Inherited by grenades, gun, and knife.

Collaboration diagram for weapon:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 weapon (struct playerent *owner, int type)
virtual ~weapon ()
virtual int dynspread ()
virtual float dynrecoil ()
virtual bool attack (vec &targ)=0
virtual void attackfx (const vec &from, const vec &to, int millis)=0
virtual void attackphysics (vec &from, vec &to)
virtual void attacksound ()
virtual bool reload ()
virtual void reset ()
virtual bool busy ()
virtual int modelanim ()=0
virtual void updatetimers ()
virtual bool selectable ()
virtual bool deselectable ()
virtual void renderstats ()
virtual void renderhudmodel ()
virtual void renderaimhelp (bool teamwarning)
virtual void onselecting ()
virtual void ondeselecting ()
virtual void onammopicked ()
virtual void onownerdies ()
void sendshoot (vec &from, vec &to)
bool modelattacking ()
void renderhudmodel (int lastaction, int index=0)
virtual int flashtime () const

Static Public Member Functions

static void equipplayer (playerent *pl)
static bool valid (int id)

Public Attributes

int type
playerent * owner
struct guninfo & info
int & ammo
int & mag
int & gunwait
int shots
int reloading
int lastaction

Static Public Attributes

static const int weaponchangetime = 400
static const float weaponbeloweye = 0.2f


Constructor & Destructor Documentation

weapon::weapon ( struct playerent *  owner,
int  type 
)

virtual weapon::~weapon (  )  [inline, virtual]


Member Function Documentation

virtual bool weapon::attack ( vec &  targ  )  [pure virtual]

Implemented in grenades, gun, shotgun, akimbo, and knife.

virtual void weapon::attackfx ( const vec &  from,
const vec &  to,
int  millis 
) [pure virtual]

Implemented in grenades, gun, sniperrifle, shotgun, and knife.

void weapon::attackphysics ( vec &  from,
vec &  to 
) [virtual]

void weapon::attacksound (  )  [virtual]

virtual bool weapon::busy (  )  [inline, virtual]

Reimplemented in grenades.

bool weapon::deselectable (  )  [virtual]

float weapon::dynrecoil (  )  [virtual]

Reimplemented in sniperrifle, and assaultrifle.

int weapon::dynspread (  )  [virtual]

Reimplemented in sniperrifle, and assaultrifle.

void weapon::equipplayer ( playerent *  pl  )  [static]

int weapon::flashtime (  )  const [virtual]

Reimplemented in grenades, and knife.

virtual int weapon::modelanim (  )  [pure virtual]

Implemented in grenades, gun, and knife.

bool weapon::modelattacking (  ) 

virtual void weapon::onammopicked (  )  [inline, virtual]

Reimplemented in akimbo.

virtual void weapon::ondeselecting (  )  [inline, virtual]

Reimplemented in sniperrifle.

virtual void weapon::onownerdies (  )  [inline, virtual]

Reimplemented in grenades, and sniperrifle.

void weapon::onselecting (  )  [virtual]

Reimplemented in grenades, sniperrifle, and akimbo.

bool weapon::reload (  )  [virtual]

Reimplemented in sniperrifle.

void weapon::renderaimhelp ( bool  teamwarning  )  [virtual]

Reimplemented in sniperrifle.

void weapon::renderhudmodel ( int  lastaction,
int  index = 0 
)

void weapon::renderhudmodel (  )  [virtual]

Reimplemented in sniperrifle, and akimbo.

void weapon::renderstats (  )  [virtual]

i", mag, ammo);

Reimplemented in grenades, and knife.

virtual void weapon::reset (  )  [inline, virtual]

Reimplemented in grenades, and akimbo.

bool weapon::selectable (  )  [virtual]

void weapon::sendshoot ( vec &  from,
vec &  to 
)

void weapon::updatetimers (  )  [virtual]

Reimplemented in akimbo.

bool weapon::valid ( int  id  )  [static]


Member Data Documentation

struct guninfo& weapon::info [read]

int & weapon::mag

const float weapon::weaponbeloweye = 0.2f [static]

const int weapon::weaponchangetime = 400 [static]


The documentation for this struct was generated from the following files:

Generated on Mon Dec 8 21:41:37 2008 for AssaultCube by  doxygen 1.5.7.1