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

#include <capture_server.hpp>

Inheritance diagram for server::captureservermode:
server::servmode capturemode_common

Public Member Functions

void reset (bool empty)
 
void cleanup () override
 
void setup () override
 
void newmap () override
 
void stealbase (int n, const char *team)
 
void replenishammo (clientinfo *ci)
 
void movebases (const char *team, const vec &oldpos, bool oldclip, const vec &newpos, bool newclip)
 
void leavebases (const char *team, const vec &o)
 
void enterbases (const char *team, const vec &o)
 
void addscore (int base, const char *team, int n)
 
void regenowners (baseinfo &b, int ticks)
 
void update () override
 
void sendbaseinfo (int i)
 
void sendbases ()
 
void initclient (clientinfo *ci, packetbuf &p, bool connecting) override
 
void endcheck ()
 
void entergame (clientinfo *ci) override
 
void spawned (clientinfo *ci) override
 
void leavegame (clientinfo *ci, bool disconnecting=false) override
 
void died (clientinfo *ci, clientinfo *actor) override
 
bool canspawn (clientinfo *ci, bool connecting) override
 
void moved (clientinfo *ci, const vec &oldpos, bool oldclip, const vec &newpos, bool newclip) override
 
void changeteam (clientinfo *ci, const char *oldteam, const char *newteam) override
 
void parsebases (ucharbuf &p, bool commit)
 
bool extinfoteam (const char *team, ucharbuf &p) override
 
bool parse_network_message (int type, clientinfo *ci, clientinfo *cq, packetbuf &p) override
 process gamemode specific network messages. More...
 
virtual void connected (clientinfo *ci)
 
virtual int fragvalue (clientinfo *victim, clientinfo *actor)
 
virtual bool canhit (clientinfo *victim, clientinfo *actor)
 
virtual bool canchangeteam (clientinfo *ci, const char *oldteam, const char *newteam)
 
virtual void updatelimbo ()
 
virtual void intermission ()
 
virtual bool hidefrags ()
 
virtual int getteamscore (const char *team)
 
virtual void getteamscores (vector< teamscore > &scores)
 
void resetbases ()
 
bool hidefrags ()
 
int getteamscore (const char *team)
 
void getteamscores (vector< teamscore > &teamscores)
 
scorefindscore (const char *team)
 
void addbase (int ammotype, const vec &o)
 
void initbase (int i, int ammotype, const char *owner, const char *enemy, int converted, int ammo)
 
bool hasbases (const char *team)
 
float disttoenemy (baseinfo &b)
 
bool insidebase (const baseinfo &b, const vec &o)
 

Public Attributes

bool notgotbases = false
 
vector< baseinfobases
 
vector< scorescores
 
int captures = 0
 

Static Public Attributes

static const int CAPTURERADIUS = 64
 
static const int CAPTUREHEIGHT = 24
 
static const int OCCUPYBONUS = 1
 
static const int OCCUPYPOINTS = 1
 
static const int OCCUPYENEMYLIMIT = 28
 
static const int OCCUPYNEUTRALLIMIT = 14
 
static const int SCORESECS = 10
 
static const int AMMOSECS = 15
 
static const int REGENSECS = 1
 
static const int REGENHEALTH = 10
 
static const int REGENARMOUR = 10
 
static const int REGENAMMO = 20
 
static const int MAXAMMO = 5
 
static const int REPAMMODIST = 32
 
static const int RESPAWNSECS = 10
 
static const int REGENRESPAWNSECS = 0
 
static const int MAXBASES = 100
 

Member Function Documentation

void capturemode_common::addbase ( int  ammotype,
const vec o 
)
inlineinherited
void server::captureservermode::addscore ( int  base,
const char *  team,
int  n 
)
virtual bool server::servmode::canchangeteam ( clientinfo ci,
const char *  oldteam,
const char *  newteam 
)
inlinevirtualinherited
virtual bool server::servmode::canhit ( clientinfo victim,
clientinfo actor 
)
inlinevirtualinherited

Reimplemented in server::hideandseekservermode.

Referenced by server::dodamage().

bool server::captureservermode::canspawn ( clientinfo ci,
bool  connecting 
)
inlineoverridevirtual
void server::captureservermode::changeteam ( clientinfo ci,
const char *  oldteam,
const char *  newteam 
)
overridevirtual
void server::captureservermode::cleanup ( )
inlineoverridevirtual

Reimplemented from server::servmode.

References reset().

virtual void server::servmode::connected ( clientinfo ci)
inlinevirtualinherited

Reimplemented in server::hideandseekservermode.

void server::captureservermode::died ( clientinfo ci,
clientinfo actor 
)
inlineoverridevirtual
float capturemode_common::disttoenemy ( baseinfo b)
inlineinherited
void server::captureservermode::endcheck ( )
void server::captureservermode::enterbases ( const char *  team,
const vec o 
)
inline

References movebases().

Referenced by changeteam(), entergame(), and spawned().

void server::captureservermode::entergame ( clientinfo ci)
inlineoverridevirtual
bool server::captureservermode::extinfoteam ( const char *  team,
ucharbuf p 
)
overridevirtual

Reimplemented from server::servmode.

References capturemode_common::bases, loopvj, and putint().

score& capturemode_common::findscore ( const char *  team)
inlineinherited
virtual int server::servmode::fragvalue ( clientinfo victim,
clientinfo actor 
)
inlinevirtualinherited
virtual int server::servmode::getteamscore ( const char *  team)
inlinevirtualinherited
int capturemode_common::getteamscore ( const char *  team)
inlineinherited
virtual void server::servmode::getteamscores ( vector< teamscore > &  scores)
inlinevirtualinherited

Referenced by server::extinfoteams().

void capturemode_common::getteamscores ( vector< teamscore > &  teamscores)
inlineinherited
bool capturemode_common::hasbases ( const char *  team)
inlineinherited
virtual bool server::servmode::hidefrags ( )
inlinevirtualinherited
bool capturemode_common::hidefrags ( )
inlineinherited
void capturemode_common::initbase ( int  i,
int  ammotype,
const char *  owner,
const char *  enemy,
int  converted,
int  ammo 
)
inlineinherited
void server::captureservermode::initclient ( clientinfo ci,
packetbuf p,
bool  connecting 
)
overridevirtual
bool capturemode_common::insidebase ( const baseinfo b,
const vec o 
)
inlineinherited
virtual void server::servmode::intermission ( )
inlinevirtualinherited
void server::captureservermode::leavebases ( const char *  team,
const vec o 
)
inline

References movebases().

Referenced by changeteam(), died(), and leavegame().

void server::captureservermode::leavegame ( clientinfo ci,
bool  disconnecting = false 
)
inlineoverridevirtual
void server::captureservermode::movebases ( const char *  team,
const vec oldpos,
bool  oldclip,
const vec newpos,
bool  newclip 
)
void server::captureservermode::moved ( clientinfo ci,
const vec oldpos,
bool  oldclip,
const vec newpos,
bool  newclip 
)
inlineoverridevirtual

Reimplemented from server::servmode.

References movebases(), notgotbases, and server::clientinfo::team.

void server::captureservermode::newmap ( )
inlineoverridevirtual

Reimplemented from server::servmode.

References reset().

bool server::captureservermode::parse_network_message ( int  type,
clientinfo ci,
clientinfo cq,
packetbuf p 
)
overridevirtual

process gamemode specific network messages.

Parameters
typethe N_ network message type
cithe sender.
cqthe currently focused player (sender or bot from senders pc)
pthe network packet containing the data
Returns
whether this messages got processed.

Implements server::servmode.

References server::clientinfo::clientmap, CS_SPECTATOR, N_BASES, N_REPAMMO, parsebases(), server::clientinfo::privilege, replenishammo(), server::smapname, server::gamestate::state, and server::clientinfo::state.

void server::captureservermode::parsebases ( ucharbuf p,
bool  commit 
)
void server::captureservermode::regenowners ( capturemode_common::baseinfo b,
int  ticks 
)
void server::captureservermode::replenishammo ( clientinfo ci)
void server::captureservermode::reset ( bool  empty)
inline
void capturemode_common::resetbases ( )
inlineinherited
void server::captureservermode::sendbaseinfo ( int  i)
void server::captureservermode::sendbases ( )
void server::captureservermode::setup ( )
overridevirtual
void server::captureservermode::spawned ( clientinfo ci)
inlineoverridevirtual
void server::captureservermode::stealbase ( int  n,
const char *  team 
)
void server::captureservermode::update ( )
overridevirtual
virtual void server::servmode::updatelimbo ( )
inlinevirtualinherited

Reimplemented in server::bombservermode.

Referenced by server::serverupdate().

Member Data Documentation

const int capturemode_common::AMMOSECS = 15
staticinherited

Referenced by update().

vector<baseinfo> capturemode_common::bases
inherited
const int capturemode_common::CAPTUREHEIGHT = 24
staticinherited
const int capturemode_common::CAPTURERADIUS = 64
staticinherited
int capturemode_common::captures = 0
inherited
const int capturemode_common::MAXAMMO = 5
staticinherited
const int capturemode_common::MAXBASES = 100
staticinherited
bool server::captureservermode::notgotbases = false
const int capturemode_common::OCCUPYBONUS = 1
staticinherited

Referenced by update().

const int capturemode_common::OCCUPYENEMYLIMIT = 28
staticinherited
const int capturemode_common::OCCUPYNEUTRALLIMIT = 14
staticinherited
const int capturemode_common::OCCUPYPOINTS = 1
staticinherited

Referenced by update().

const int capturemode_common::REGENAMMO = 20
staticinherited

Referenced by regenowners().

const int capturemode_common::REGENARMOUR = 10
staticinherited

Referenced by regenowners().

const int capturemode_common::REGENHEALTH = 10
staticinherited

Referenced by regenowners().

const int capturemode_common::REGENRESPAWNSECS = 0
staticinherited
const int capturemode_common::REGENSECS = 1
staticinherited

Referenced by update().

const int capturemode_common::REPAMMODIST = 32
staticinherited
const int capturemode_common::RESPAWNSECS = 10
staticinherited
vector<score> capturemode_common::scores
inherited
const int capturemode_common::SCORESECS = 10
staticinherited

Referenced by update().


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