DDNet documentation
Loading...
Searching...
No Matches
CPlayerMapping Class Reference

#include <playermapping.h>

Collaboration diagram for CPlayerMapping:
[legend]

Classes

class  CPlayerMap

Public Types

enum class  ESeeOthersInd { NONE = -1 , PLAYER = 0 , BUTTON = 1 }

Public Member Functions

class CGameContextGameServer ()
class CConfigConfig ()
class IServerServer ()
void Init (CGameContext *pGameServer)
void Tick ()
void InitPlayerMap (int ClientId, bool Timeout=false)
void UpdateTeamsState (int ClientId)
void ForceInsertPlayer (int Insert, int ClientId)
int SeeOthersId () const
bool DoSeeOthers (int ClientId, int SelectedId, bool DoByVote=false)
void ResetSeeOthers (int ClientId)
int TotalOverhang (int ClientId) const
ESeeOthersInd SeeOthersInd (int ClientId, int MapId) const
const char * SeeOthersName (int ClientId)
bool ReserveTeamSlots (int DDTeam) const

Private Member Functions

void UpdatePlayerMap (int ClientId)

Private Attributes

class CGameContextm_pGameServer
class CConfigm_pConfig
class IServerm_pServer
int m_aTeamSizes [NUM_DDRACE_TEAMS]
char m_aSeeOthersName [MAX_NAME_LENGTH]
class CPlayerMapping::CPlayerMap m_aMap [MAX_CLIENTS]

Static Private Attributes

static constexpr int ms_MaxNumSeeOthers = 34
static constexpr int ms_MaxTeamSizePlayerMap = 10

Member Enumeration Documentation

◆ ESeeOthersInd

enum class CPlayerMapping::ESeeOthersInd
strong
Enumerator
NONE 
PLAYER 
BUTTON 

Member Function Documentation

◆ Config()

class CConfig * CPlayerMapping::Config ( )
inline

◆ DoSeeOthers()

bool CPlayerMapping::DoSeeOthers ( int ClientId,
int SelectedId,
bool DoByVote = false )

◆ ForceInsertPlayer()

void CPlayerMapping::ForceInsertPlayer ( int Insert,
int ClientId )
inline

◆ GameServer()

class CGameContext * CPlayerMapping::GameServer ( )
inline

◆ Init()

void CPlayerMapping::Init ( CGameContext * pGameServer)

◆ InitPlayerMap()

void CPlayerMapping::InitPlayerMap ( int ClientId,
bool Timeout = false )
inline

◆ ReserveTeamSlots()

bool CPlayerMapping::ReserveTeamSlots ( int DDTeam) const

◆ ResetSeeOthers()

void CPlayerMapping::ResetSeeOthers ( int ClientId)

◆ SeeOthersId()

int CPlayerMapping::SeeOthersId ( ) const

◆ SeeOthersInd()

CPlayerMapping::ESeeOthersInd CPlayerMapping::SeeOthersInd ( int ClientId,
int MapId ) const

◆ SeeOthersName()

const char * CPlayerMapping::SeeOthersName ( int ClientId)

◆ Server()

class IServer * CPlayerMapping::Server ( )
inline

◆ Tick()

void CPlayerMapping::Tick ( )

◆ TotalOverhang()

int CPlayerMapping::TotalOverhang ( int ClientId) const

◆ UpdatePlayerMap()

void CPlayerMapping::UpdatePlayerMap ( int ClientId)
private

◆ UpdateTeamsState()

void CPlayerMapping::UpdateTeamsState ( int ClientId)
inline

Member Data Documentation

◆ m_aMap

class CPlayerMapping::CPlayerMap CPlayerMapping::m_aMap[MAX_CLIENTS]
private

◆ m_aSeeOthersName

char CPlayerMapping::m_aSeeOthersName[MAX_NAME_LENGTH]
private

◆ m_aTeamSizes

int CPlayerMapping::m_aTeamSizes[NUM_DDRACE_TEAMS]
private

◆ m_pConfig

class CConfig* CPlayerMapping::m_pConfig
private

◆ m_pGameServer

class CGameContext* CPlayerMapping::m_pGameServer
private

◆ m_pServer

class IServer* CPlayerMapping::m_pServer
private

◆ ms_MaxNumSeeOthers

int CPlayerMapping::ms_MaxNumSeeOthers = 34
staticconstexprprivate

◆ ms_MaxTeamSizePlayerMap

int CPlayerMapping::ms_MaxTeamSizePlayerMap = 10
staticconstexprprivate

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