DDraceNetwork Docs
IGameController Class Reference

#include <gamecontroller.h>

Inheritance diagram for IGameController:
[legend]
Collaboration diagram for IGameController:
[legend]

Classes

struct  CSpawnEval
 

Public Member Functions

 IGameController (class CGameContext *pGameServer)
 
virtual ~IGameController ()
 
virtual int OnCharacterDeath (class CCharacter *pVictim, class CPlayer *pKiller, int Weapon)
 
virtual void OnCharacterSpawn (class CCharacter *pChr)
 
virtual void HandleCharacterTiles (class CCharacter *pChr, int MapIndex)
 
virtual void SetArmorProgress (CCharacter *pCharacer, int Progress)
 
virtual bool OnEntity (int Index, int x, int y, int Layer, int Flags, bool Initial, int Number=0)
 
virtual void OnPlayerConnect (class CPlayer *pPlayer)
 
virtual void OnPlayerDisconnect (class CPlayer *pPlayer, const char *pReason)
 
virtual void OnReset ()
 
void DoWarmup (int Seconds)
 
void StartRound ()
 
void EndRound ()
 
void ChangeMap (const char *pToMap)
 
bool IsForceBalanced ()
 
virtual bool CanBeMovedOnBalance (int ClientId)
 
virtual void Tick ()
 
virtual void Snap (int SnappingClient)
 
virtual bool CanSpawn (int Team, vec2 *pOutPos, int DDTeam)
 
virtual void DoTeamChange (class CPlayer *pPlayer, int Team, bool DoChatMsg=true)
 
virtual const char * GetTeamName (int Team)
 
virtual int GetAutoTeam (int NotThisId)
 
virtual bool CanJoinTeam (int Team, int NotThisId, char *pErrorReason, int ErrorReasonSize)
 
int ClampTeam (int Team)
 
CClientMask GetMaskForPlayerWorldEvent (int Asker, int ExceptID=-1)
 
bool IsTeamPlay ()
 
CGameTeamsTeams ()
 

Public Attributes

const char * m_pGameType
 
float m_CurrentRecord
 
std::shared_ptr< CScoreLoadBestTimeResultm_pLoadBestTimeResult
 

Protected Member Functions

CGameContextGameServer () const
 
CConfigConfig ()
 
IServerServer () const
 
void DoActivityCheck ()
 
float EvaluateSpawnPos (CSpawnEval *pEval, vec2 Pos, int DDTeam)
 
void EvaluateSpawnType (CSpawnEval *pEval, int Type, int DDTeam)
 
void ResetGame ()
 

Protected Attributes

char m_aMapWish [MAX_MAP_LENGTH]
 
int m_RoundStartTick
 
int m_GameOverTick
 
int m_SuddenDeath
 
int m_Warmup
 
int m_RoundCount
 
int m_GameFlags
 
int m_UnbalancedTick
 
bool m_ForceBalanced
 

Private Attributes

std::vector< vec2m_avSpawnPoints [3]
 
class CGameContextm_pGameServer
 
class CConfigm_pConfig
 
class IServerm_pServer
 
CGameTeams m_Teams
 

Friends

class CSaveTeam
 

Constructor & Destructor Documentation

◆ IGameController()

IGameController::IGameController ( class CGameContext pGameServer)

◆ ~IGameController()

IGameController::~IGameController ( )
virtualdefault

Member Function Documentation

◆ CanBeMovedOnBalance()

bool IGameController::CanBeMovedOnBalance ( int  ClientId)
virtual

◆ CanJoinTeam()

bool IGameController::CanJoinTeam ( int  Team,
int  NotThisId,
char *  pErrorReason,
int  ErrorReasonSize 
)
virtual

◆ CanSpawn()

bool IGameController::CanSpawn ( int  Team,
vec2 pOutPos,
int  DDTeam 
)
virtual

◆ ChangeMap()

void IGameController::ChangeMap ( const char *  pToMap)

◆ ClampTeam()

int IGameController::ClampTeam ( int  Team)

◆ Config()

CConfig * IGameController::Config ( )
inlineprotected

◆ DoActivityCheck()

void IGameController::DoActivityCheck ( )
protected

◆ DoTeamChange()

void IGameController::DoTeamChange ( class CPlayer pPlayer,
int  Team,
bool  DoChatMsg = true 
)
virtual

Reimplemented in CGameControllerDDRace.

◆ DoWarmup()

void IGameController::DoWarmup ( int  Seconds)

◆ EndRound()

void IGameController::EndRound ( )

◆ EvaluateSpawnPos()

float IGameController::EvaluateSpawnPos ( CSpawnEval pEval,
vec2  Pos,
int  DDTeam 
)
protected

◆ EvaluateSpawnType()

void IGameController::EvaluateSpawnType ( CSpawnEval pEval,
int  Type,
int  DDTeam 
)
protected

◆ GameServer()

CGameContext * IGameController::GameServer ( ) const
inlineprotected

◆ GetAutoTeam()

int IGameController::GetAutoTeam ( int  NotThisId)
virtual

◆ GetMaskForPlayerWorldEvent()

CClientMask IGameController::GetMaskForPlayerWorldEvent ( int  Asker,
int  ExceptID = -1 
)

◆ GetTeamName()

const char * IGameController::GetTeamName ( int  Team)
virtual

◆ HandleCharacterTiles()

void IGameController::HandleCharacterTiles ( class CCharacter pChr,
int  MapIndex 
)
virtual

Reimplemented in CGameControllerDDRace.

◆ IsForceBalanced()

bool IGameController::IsForceBalanced ( )

◆ IsTeamPlay()

bool IGameController::IsTeamPlay ( )
inline

◆ OnCharacterDeath()

int IGameController::OnCharacterDeath ( class CCharacter pVictim,
class CPlayer pKiller,
int  Weapon 
)
virtual

◆ OnCharacterSpawn()

void IGameController::OnCharacterSpawn ( class CCharacter pChr)
virtual

◆ OnEntity()

bool IGameController::OnEntity ( int  Index,
int  x,
int  y,
int  Layer,
int  Flags,
bool  Initial,
int  Number = 0 
)
virtual

◆ OnPlayerConnect()

void IGameController::OnPlayerConnect ( class CPlayer pPlayer)
virtual

Reimplemented in CGameControllerDDRace.

◆ OnPlayerDisconnect()

void IGameController::OnPlayerDisconnect ( class CPlayer pPlayer,
const char *  pReason 
)
virtual

Reimplemented in CGameControllerDDRace.

◆ OnReset()

void IGameController::OnReset ( )
virtual

Reimplemented in CGameControllerDDRace.

◆ ResetGame()

void IGameController::ResetGame ( )
protected

◆ Server()

IServer * IGameController::Server ( ) const
inlineprotected

◆ SetArmorProgress()

virtual void IGameController::SetArmorProgress ( CCharacter pCharacer,
int  Progress 
)
inlinevirtual

Reimplemented in CGameControllerDDRace.

◆ Snap()

void IGameController::Snap ( int  SnappingClient)
virtual

◆ StartRound()

void IGameController::StartRound ( )

◆ Teams()

CGameTeams & IGameController::Teams ( )
inline

◆ Tick()

void IGameController::Tick ( )
virtual

Reimplemented in CGameControllerDDRace, and CGameControllerMod.

Friends And Related Function Documentation

◆ CSaveTeam

friend class CSaveTeam
friend

Member Data Documentation

◆ m_aMapWish

char IGameController::m_aMapWish[MAX_MAP_LENGTH]
protected

◆ m_avSpawnPoints

std::vector<vec2> IGameController::m_avSpawnPoints[3]
private

◆ m_CurrentRecord

float IGameController::m_CurrentRecord

◆ m_ForceBalanced

bool IGameController::m_ForceBalanced
protected

◆ m_GameFlags

int IGameController::m_GameFlags
protected

◆ m_GameOverTick

int IGameController::m_GameOverTick
protected

◆ m_pConfig

class CConfig* IGameController::m_pConfig
private

◆ m_pGameServer

class CGameContext* IGameController::m_pGameServer
private

◆ m_pGameType

const char* IGameController::m_pGameType

◆ m_pLoadBestTimeResult

std::shared_ptr<CScoreLoadBestTimeResult> IGameController::m_pLoadBestTimeResult

◆ m_pServer

class IServer* IGameController::m_pServer
private

◆ m_RoundCount

int IGameController::m_RoundCount
protected

◆ m_RoundStartTick

int IGameController::m_RoundStartTick
protected

◆ m_SuddenDeath

int IGameController::m_SuddenDeath
protected

◆ m_Teams

CGameTeams IGameController::m_Teams
private

◆ m_UnbalancedTick

int IGameController::m_UnbalancedTick
protected

◆ m_Warmup

int IGameController::m_Warmup
protected

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