R:/projects/actioncube/_svn/trunk/ac/source/src/weapon.cpp File Reference

#include "pch.h"
#include "cube.h"
#include "bot/bot.h"
#include "hudgun.h"

Include dependency graph for weapon.cpp:


Defines

#define RNDD   (rnd(101)-50)*f
#define RNDD   (rnd(spread)-spread/2)*f
#define SCOPESETTLETIME   100

Enumerations

enum  { NS_NONE, NS_ACTIVATED = 0, NS_THROWED, NS_EXPLODED }

Functions

 VARP (autoreload, 0, 1, 1)
void updatelastaction (playerent *d)
void checkweaponswitch ()
void selectweapon (weapon *w)
void selectweaponi (int w)
void shiftweapon (int s)
int currentprimary ()
int prevweapon ()
int curweapon ()
int magcontent (int w)
int magreserve (int w)
 COMMANDN (weapon, selectweaponi, ARG_1INT)
 COMMAND (shiftweapon, ARG_1INT)
 COMMAND (currentprimary, ARG_IVAL)
 COMMAND (prevweapon, ARG_IVAL)
 COMMAND (curweapon, ARG_IVAL)
 COMMAND (magcontent, ARG_1EXP)
 COMMAND (magreserve, ARG_1EXP)
void tryreload (playerent *p)
void selfreload ()
 COMMANDN (reload, selfreload, ARG_NONE)
void createrays (vec &from, vec &to)
static bool intersectbox (const vec &o, const vec &rad, const vec &from, const vec &to, vec *end)
static bool intersectsphere (const vec &from, const vec &to, vec center, float radius, float &dist)
static bool intersectcylinder (const vec &from, const vec &to, const vec &start, const vec &end, float radius, float &dist)
int intersect (playerent *d, const vec &from, const vec &to, vec *end)
bool intersect (entity *e, const vec &from, const vec &to, vec *end)
playerent * intersectclosest (const vec &from, const vec &to, playerent *at, int &hitzone, bool aiming=true)
playerent * playerincrosshair ()
void damageeffect (int damage, playerent *d)
void hit (int damage, playerent *d, playerent *at, const vec &vel, int gun, bool gib, int info)
void hitpush (int damage, playerent *d, playerent *at, vec &from, vec &to, int gun, bool gib, int info)
float expdist (playerent *o, vec &dir, const vec &v)
void radialeffect (playerent *o, vec &v, int qdam, playerent *at, int gun)
void removebounceents (playerent *owner)
void movebounceents ()
void clearbounceents ()
void renderbounceents ()
 VARP (gib, 0, 1, 1)
 VARP (gibnum, 0, 6, 1000)
 VARP (gibttl, 0, 7000, 60000)
 VARP (gibspeed, 1, 30, 100)
void addgib (playerent *d)
void shorten (vec &from, vec &to, vec &target)
void raydamage (vec &from, vec &to, playerent *d)
 VAR (recoilincrease, 1, 2, 10)
 VAR (recoilbase, 0, 40, 1000)
 VAR (maxrecoil, 0, 1000, 1000)
void setscope (bool enable)
 COMMAND (setscope, ARG_1INT)
void shoot (playerent *p, vec &targ)
void checkakimbo ()

Variables

vec sg [SGRAYS]
vector< hitmsg > hits
vector< bounceent * > bounceents
int recoiltest = 0

Define Documentation

#define RNDD   (rnd(spread)-spread/2)*f

#define RNDD   (rnd(101)-50)*f

#define SCOPESETTLETIME   100


Enumeration Type Documentation

anonymous enum

Enumerator:
NS_NONE 
NS_ACTIVATED 
NS_THROWED 
NS_EXPLODED 


Function Documentation

void addgib ( playerent *  d  ) 

void checkakimbo (  ) 

void checkweaponswitch (  ) 

void clearbounceents (  ) 

COMMAND ( setscope  ,
ARG_1INT   
)

COMMAND ( magreserve  ,
ARG_1EXP   
)

COMMAND ( magcontent  ,
ARG_1EXP   
)

COMMAND ( curweapon  ,
ARG_IVAL   
)

COMMAND ( prevweapon  ,
ARG_IVAL   
)

COMMAND ( currentprimary  ,
ARG_IVAL   
)

COMMAND ( shiftweapon  ,
ARG_1INT   
)

COMMANDN ( reload  ,
selfreload  ,
ARG_NONE   
)

COMMANDN ( weapon  ,
selectweaponi  ,
ARG_1INT   
)

void createrays ( vec &  from,
vec &  to 
)

int currentprimary (  ) 

int curweapon (  ) 

void damageeffect ( int  damage,
playerent *  d 
)

float expdist ( playerent *  o,
vec &  dir,
const vec &  v 
)

void hit ( int  damage,
playerent *  d,
playerent *  at,
const vec &  vel,
int  gun,
bool  gib,
int  info 
)

void hitpush ( int  damage,
playerent *  d,
playerent *  at,
vec &  from,
vec &  to,
int  gun,
bool  gib,
int  info 
)

bool intersect ( entity *  e,
const vec &  from,
const vec &  to,
vec *  end 
)

int intersect ( playerent *  d,
const vec &  from,
const vec &  to,
vec *  end 
)

static bool intersectbox ( const vec &  o,
const vec &  rad,
const vec &  from,
const vec &  to,
vec *  end 
) [inline, static]

playerent* intersectclosest ( const vec &  from,
const vec &  to,
playerent *  at,
int &  hitzone,
bool  aiming = true 
)

static bool intersectcylinder ( const vec &  from,
const vec &  to,
const vec &  start,
const vec &  end,
float  radius,
float &  dist 
) [inline, static]

static bool intersectsphere ( const vec &  from,
const vec &  to,
vec  center,
float  radius,
float &  dist 
) [inline, static]

int magcontent ( int  w  ) 

int magreserve ( int  w  ) 

void movebounceents (  ) 

playerent* playerincrosshair (  ) 

int prevweapon (  ) 

void radialeffect ( playerent *  o,
vec &  v,
int  qdam,
playerent *  at,
int  gun 
)

void raydamage ( vec &  from,
vec &  to,
playerent *  d 
)

void removebounceents ( playerent *  owner  ) 

void renderbounceents (  ) 

void selectweapon ( weapon *  w  ) 

void selectweaponi ( int  w  ) 

void selfreload (  ) 

void setscope ( bool  enable  ) 

void shiftweapon ( int  s  ) 

void shoot ( playerent *  p,
vec &  targ 
)

void shorten ( vec &  from,
vec &  to,
vec &  target 
)

void tryreload ( playerent *  p  ) 

void updatelastaction ( playerent *  d  ) 

VAR ( maxrecoil  ,
0  ,
1000  ,
1000   
)

VAR ( recoilbase  ,
0  ,
40  ,
1000   
)

VAR ( recoilincrease  ,
1  ,
2  ,
10   
)

VARP ( gibspeed  ,
1  ,
30  ,
100   
)

VARP ( gibttl  ,
0  ,
7000  ,
60000   
)

VARP ( gibnum  ,
0  ,
6  ,
1000   
)

VARP ( gib  ,
0  ,
1  ,
1   
)

VARP ( autoreload  ,
0  ,
1  ,
1   
)


Variable Documentation

int recoiltest = 0

vec sg[SGRAYS]


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