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::collectservermode Struct Reference

#include <collect_server.hpp>

Inheritance diagram for server::collectservermode:
server::servmode collectmode_common

Public Member Functions

tokendroptoken (const vec &o, int yaw, int team, int droptime, int dropper)
 
void reset (bool empty)
 
void cleanup () override
 
void setup () override
 
void newmap () override
 
void droptokens (clientinfo *ci, bool penalty=false)
 
void leavegame (clientinfo *ci, bool disconnecting=false) override
 
void died (clientinfo *ci, clientinfo *actor) override
 
bool canspawn (clientinfo *ci, bool connecting) override
 
bool canchangeteam (clientinfo *ci, const char *oldteam, const char *newteam) override
 
void changeteam (clientinfo *ci, const char *oldteam, const char *newteam) override
 
void deposittokens (clientinfo *ci, int basenum)
 
void taketoken (clientinfo *ci, int id)
 
void update () override
 
void initclient (clientinfo *ci, packetbuf &p, bool connecting) override
 
void parsebases (ucharbuf &p, bool commit)
 
bool parse_network_message (int type, clientinfo *ci, clientinfo *cq, packetbuf &p) override
 process gamemode specific network messages. More...
 
virtual void entergame (clientinfo *ci)
 
virtual void connected (clientinfo *ci)
 
virtual void moved (clientinfo *ci, const vec &oldpos, bool oldclip, const vec &newpos, bool newclip)
 
virtual void spawned (clientinfo *ci)
 
virtual int fragvalue (clientinfo *victim, clientinfo *actor)
 
virtual bool canhit (clientinfo *victim, clientinfo *actor)
 
virtual void updatelimbo ()
 
virtual void intermission ()
 
virtual bool hidefrags ()
 
virtual int getteamscore (const char *team)
 
virtual void getteamscores (vector< teamscore > &scores)
 
virtual bool extinfoteam (const char *team, ucharbuf &p)
 
void resetbases ()
 
bool addbase (int i, const vec &o, int team)
 
tokenfindtoken (int id)
 
tokendroptoken (const vec &o, int team, int droptime)
 
bool removetoken (int id)
 
int totalscore (int team)
 
int setscore (int team, int score)
 
int addscore (int team, int score)
 
bool hidefrags ()
 
int getteamscore (const char *team)
 
void getteamscores (vector< teamscore > &tscores)
 
bool insidebase (const base &b, const vec &o)
 

Public Attributes

bool notgotbases = false
 
vector< basebases
 
int scores [2]
 
vector< tokentokens
 
int nexttoken
 

Static Public Attributes

static const int BASERADIUS = 16
 
static const int BASEHEIGHT = 16
 
static const int MAXBASES = 20
 
static const int TOKENRADIUS = 16
 
static const int TOKENLIMIT = 5
 
static const int UNOWNEDTOKENLIMIT = 15
 
static const int TOKENDIST = 16
 
static const int SCORELIMIT = 50
 
static const int RESPAWNSECS = 5
 
static const int EXPIRETOKENTIME = 10000
 
static const int STEALTOKENTIME = 5000
 

Member Function Documentation

bool collectmode_common::addbase ( int  i,
const vec o,
int  team 
)
inlineinherited
int collectmode_common::addscore ( int  team,
int  score 
)
inlineinherited

References collectmode_common::scores.

Referenced by deposittokens().

bool server::collectservermode::canchangeteam ( clientinfo ci,
const char *  oldteam,
const char *  newteam 
)
inlineoverridevirtual

Reimplemented from server::servmode.

References collectteambase.

virtual bool server::servmode::canhit ( clientinfo victim,
clientinfo actor 
)
inlinevirtualinherited

Reimplemented in server::hideandseekservermode.

Referenced by server::dodamage().

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

Reimplemented from server::servmode.

void server::collectservermode::cleanup ( )
inlineoverridevirtual

Reimplemented from server::servmode.

References reset().

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

Reimplemented in server::hideandseekservermode.

void server::collectservermode::deposittokens ( clientinfo ci,
int  basenum 
)
void server::collectservermode::died ( clientinfo ci,
clientinfo actor 
)
inlineoverridevirtual

Reimplemented from server::servmode.

References droptokens(), isteam, and server::clientinfo::team.

collectmode_common::token & server::collectservermode::droptoken ( const vec o,
int  yaw,
int  team,
int  droptime,
int  dropper 
)
token& collectmode_common::droptoken ( const vec o,
int  team,
int  droptime 
)
inlineinherited
void server::collectservermode::droptokens ( clientinfo ci,
bool  penalty = false 
)
virtual void server::servmode::entergame ( clientinfo ci)
inlinevirtualinherited

Reimplemented in server::captureservermode.

Referenced by server::parsepacket().

virtual bool server::servmode::extinfoteam ( const char *  team,
ucharbuf p 
)
inlinevirtualinherited

Reimplemented in server::captureservermode.

Referenced by server::extinfoteamscore().

token* collectmode_common::findtoken ( int  id)
inlineinherited
virtual int server::servmode::fragvalue ( clientinfo victim,
clientinfo actor 
)
inlinevirtualinherited
virtual int server::servmode::getteamscore ( const char *  team)
inlinevirtualinherited
int collectmode_common::getteamscore ( const char *  team)
inlineinherited
virtual void server::servmode::getteamscores ( vector< teamscore > &  scores)
inlinevirtualinherited

Referenced by server::extinfoteams().

void collectmode_common::getteamscores ( vector< teamscore > &  tscores)
inlineinherited
virtual bool server::servmode::hidefrags ( )
inlinevirtualinherited
bool collectmode_common::hidefrags ( )
inlineinherited
void server::collectservermode::initclient ( clientinfo ci,
packetbuf p,
bool  connecting 
)
overridevirtual
bool collectmode_common::insidebase ( const base b,
const vec o 
)
inlineinherited
virtual void server::servmode::intermission ( )
inlinevirtualinherited
void server::collectservermode::leavegame ( clientinfo ci,
bool  disconnecting = false 
)
overridevirtual
virtual void server::servmode::moved ( clientinfo ci,
const vec oldpos,
bool  oldclip,
const vec newpos,
bool  newclip 
)
inlinevirtualinherited

Reimplemented in server::captureservermode.

Referenced by server::parsepacket().

void server::collectservermode::newmap ( )
inlineoverridevirtual

Reimplemented from server::servmode.

References reset().

bool server::collectservermode::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, deposittokens(), getint(), N_DEPOSITTOKENS, N_INITTOKENS, N_TAKETOKEN, parsebases(), server::clientinfo::privilege, server::smapname, server::gamestate::state, server::clientinfo::state, and taketoken().

void server::collectservermode::parsebases ( ucharbuf p,
bool  commit 
)
bool collectmode_common::removetoken ( int  id)
inlineinherited
void server::collectservermode::reset ( bool  empty)
inline
void collectmode_common::resetbases ( )
inlineinherited
int collectmode_common::setscore ( int  team,
int  score 
)
inlineinherited
void server::collectservermode::setup ( )
overridevirtual
virtual void server::servmode::spawned ( clientinfo ci)
inlinevirtualinherited

Reimplemented in server::captureservermode.

Referenced by server::parsepacket().

void server::collectservermode::taketoken ( clientinfo ci,
int  id 
)
int collectmode_common::totalscore ( int  team)
inlineinherited
void server::collectservermode::update ( )
overridevirtual
virtual void server::servmode::updatelimbo ( )
inlinevirtualinherited

Reimplemented in server::bombservermode.

Referenced by server::serverupdate().

Member Data Documentation

const int collectmode_common::BASEHEIGHT = 16
staticinherited
const int collectmode_common::BASERADIUS = 16
staticinherited
vector<base> collectmode_common::bases
inherited
const int collectmode_common::EXPIRETOKENTIME = 10000
staticinherited

Referenced by update().

const int collectmode_common::MAXBASES = 20
staticinherited
int collectmode_common::nexttoken
inherited
bool server::collectservermode::notgotbases = false
const int collectmode_common::RESPAWNSECS = 5
staticinherited
const int collectmode_common::SCORELIMIT = 50
staticinherited
int collectmode_common::scores[2]
inherited
const int collectmode_common::STEALTOKENTIME = 5000
staticinherited
const int collectmode_common::TOKENDIST = 16
staticinherited
const int collectmode_common::TOKENLIMIT = 5
staticinherited
const int collectmode_common::TOKENRADIUS = 16
staticinherited
vector<token> collectmode_common::tokens
inherited
const int collectmode_common::UNOWNEDTOKENLIMIT = 15
staticinherited

Referenced by leavegame().


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