Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
server::gamestate Struct Reference

server specialisation of the fpsstate (?) More...

#include <client_management.hpp>

Inheritance diagram for server::gamestate:
fpsstate

Public Member Functions

 gamestate ()
 
bool isalive (int gamemillis)
 
bool waitexpired (int gamemillis)
 
void reset ()
 
void respawn ()
 
void reassign ()
 
void setbackupweapon (int weapon)
 
void baseammo (int gun, int k=2, int scale=1)
 set initial ammo More...
 
void addammo (int gun, int k=1, int scale=1)
 add ammo More...
 
bool hasmaxammo (int type)
 ammo limitation reached/exceeded? More...
 
bool canpickup (int type)
 check if I can pick up this item depending on the radius More...
 
void pickup (int type)
 pick up this item More...
 
void spawnstate (int gamemode)
 configure spawn settings (weapons, ammo, health...) depending on game mode More...
 
int dodamage (int damage)
 just subtract damage here, we can set death, etc. later in code calling this More...
 
int hasammo (int gun, int exclude=-1)
 is there ammo left for this gun More...
 

Public Attributes

vec o
 
int state
 
int editstate
 
int lastdeath
 
int deadflush
 
int lastspawn
 
int lifesequence
 
int lastshot
 
projectilestate< 8 > rockets
 
projectilestate< 8 > grenades
 
projectilestate< 8 > bombs
 
int frags
 
int flags
 
int deaths
 
int teamkills
 
int shotdamage
 
int damage
 
int tokens
 
int lasttimeplayed
 
int timeplayed
 
float effectiveness
 
int health
 
int maxhealth
 
int armour
 
int armourtype
 
int quadmillis
 
int gunselect
 
int gunwait
 
int ammo [NUMGUNS]
 
int aitype
 
int skill
 
int backupweapon
 
int bombradius
 
int bombdelay
 

Detailed Description

server specialisation of the fpsstate (?)

Constructor & Destructor Documentation

server::gamestate::gamestate ( )
inline

Member Function Documentation

void fpsstate::addammo ( int  gun,
int  k = 1,
int  scale = 1 
)
inlineinherited
void fpsstate::baseammo ( int  gun,
int  k = 2,
int  scale = 1 
)
inlineinherited

set initial ammo

References itemstat::add, fpsstate::ammo, GUN_SG, and itemstats.

Referenced by fpsstate::spawnstate().

bool fpsstate::canpickup ( int  type)
inlineinherited
int fpsstate::dodamage ( int  damage)
inlineinherited

just subtract damage here, we can set death, etc. later in code calling this

References fpsstate::armour, fpsstate::armourtype, and fpsstate::health.

Referenced by game::damaged(), and server::dodamage().

int fpsstate::hasammo ( int  gun,
int  exclude = -1 
)
inlineinherited

is there ammo left for this gun

Referenced by game::ctfclientmode::aifind(), ai::hasgoodammo(), and ai::request().

bool fpsstate::hasmaxammo ( int  type)
inlineinherited
bool server::gamestate::isalive ( int  gamemillis)
inline
void fpsstate::pickup ( int  type)
inlineinherited
void server::gamestate::reassign ( )
inline
void server::gamestate::reset ( )
inline
void server::gamestate::respawn ( )
inline
void server::gamestate::setbackupweapon ( int  weapon)
inline

References fpsstate::backupweapon.

Referenced by server::changemap().

void fpsstate::spawnstate ( int  gamemode)
inlineinherited
bool server::gamestate::waitexpired ( int  gamemillis)
inline

Member Data Documentation

int fpsstate::aitype
inherited
int fpsstate::ammo[NUMGUNS]
inherited
int fpsstate::armour
inherited
int fpsstate::armourtype
inherited
int fpsstate::backupweapon
inherited
int fpsstate::bombdelay
inherited
int fpsstate::bombradius
inherited
projectilestate<8> server::gamestate::bombs
int server::gamestate::damage
int server::gamestate::deadflush
int server::gamestate::deaths
int server::gamestate::editstate

Referenced by server::parsepacket(), and reset().

float server::gamestate::effectiveness
int server::gamestate::flags
int server::gamestate::frags
projectilestate<8> server::gamestate::grenades
int fpsstate::gunselect
inherited
int fpsstate::gunwait
inherited
int fpsstate::health
inherited
int server::gamestate::lastdeath
int server::gamestate::lastshot
int server::gamestate::lastspawn
int server::gamestate::lasttimeplayed
int server::gamestate::lifesequence
int fpsstate::maxhealth
inherited
vec server::gamestate::o
int fpsstate::quadmillis
inherited
projectilestate<8> server::gamestate::rockets
int server::gamestate::shotdamage
int fpsstate::skill
inherited
int server::gamestate::state
int server::gamestate::teamkills
int server::gamestate::timeplayed
int server::gamestate::tokens

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