DDraceNetwork Docs
CGameTeams Class Reference

#include <teams.h>

Collaboration diagram for CGameTeams:
[legend]

Public Types

enum  {
  TEAMSTATE_EMPTY , TEAMSTATE_OPEN , TEAMSTATE_STARTED , TEAMSTATE_STARTED_UNFINISHABLE ,
  TEAMSTATE_FINISHED
}
 

Public Member Functions

 CGameTeams (CGameContext *pGameContext)
 
CCharacterCharacter (int ClientId)
 
CPlayerGetPlayer (int ClientId)
 
class CGameContextGameServer ()
 
class IServerServer ()
 
void OnCharacterStart (int ClientId)
 
void OnCharacterFinish (int ClientId)
 
void OnCharacterSpawn (int ClientId)
 
void OnCharacterDeath (int ClientId, int Weapon)
 
void Tick ()
 
const char * SetCharacterTeam (int ClientId, int Team)
 
void CheckTeamFinished (int Team)
 
void ChangeTeamState (int Team, int State)
 
CClientMask TeamMask (int Team, int ExceptId=-1, int Asker=-1, int VersionFlags=CGameContext::FLAG_SIX|CGameContext::FLAG_SIXUP)
 
int Count (int Team) const
 
void SetForceCharacterTeam (int ClientId, int Team)
 
void Reset ()
 
void ResetRoundState (int Team)
 
void ResetSwitchers (int Team)
 
void SendTeamsState (int ClientId)
 
void SetTeamLock (int Team, bool Lock)
 
void SetTeamFlock (int Team, bool Mode)
 
void ResetInvited (int Team)
 
void SetClientInvited (int Team, int ClientId, bool Invited)
 
int GetDDRaceState (CPlayer *Player)
 
int GetStartTime (CPlayer *Player)
 
float * GetCurrentTimeCp (CPlayer *Player)
 
void SetDDRaceState (CPlayer *Player, int DDRaceState)
 
void SetStartTime (CPlayer *Player, int StartTime)
 
void SetLastTimeCp (CPlayer *Player, int LastTimeCp)
 
void KillSavedTeam (int ClientId, int Team)
 
void ResetSavedTeam (int ClientId, int Team)
 
void RequestTeamSwap (CPlayer *pPlayer, CPlayer *pTargetPlayer, int Team)
 
void SwapTeamCharacters (CPlayer *pPrimaryPlayer, CPlayer *pTargetPlayer, int Team)
 
void ProcessSaveTeam ()
 
int GetFirstEmptyTeam () const
 
bool TeeStarted (int ClientId)
 
bool TeeFinished (int ClientId)
 
int GetTeamState (int Team)
 
bool TeamLocked (int Team)
 
bool TeamFlock (int Team)
 
bool IsInvited (int Team, int ClientId)
 
bool IsStarted (int Team)
 
void SetStarted (int ClientId, bool Started)
 
void SetFinished (int ClientId, bool Finished)
 
void SetSaving (int TeamId, std::shared_ptr< CScoreSaveResult > &SaveResult)
 
bool GetSaving (int TeamId)
 
void SetPractice (int Team, bool Enabled)
 
bool IsPractice (int Team)
 

Public Attributes

CTeamsCore m_Core
 

Private Member Functions

void KillTeam (int Team, int NewStrongId, int ExceptId=-1)
 
bool TeamFinished (int Team)
 
void OnTeamFinish (int Team, CPlayer **Players, unsigned int Size, int TimeTicks, const char *pTimestamp)
 
void OnFinish (CPlayer *Player, int TimeTicks, const char *pTimestamp)
 

Private Attributes

bool m_aTeeStarted [MAX_CLIENTS]
 
bool m_aTeeFinished [MAX_CLIENTS]
 
int m_aLastChat [MAX_CLIENTS]
 
int m_aTeamState [NUM_DDRACE_TEAMS]
 
bool m_aTeamLocked [NUM_DDRACE_TEAMS]
 
bool m_aTeamFlock [NUM_DDRACE_TEAMS]
 
CClientMask m_aInvited [NUM_DDRACE_TEAMS]
 
bool m_aPractice [NUM_DDRACE_TEAMS]
 
std::shared_ptr< CScoreSaveResultm_apSaveTeamResult [NUM_DDRACE_TEAMS]
 
uint64_t m_aLastSwap [MAX_CLIENTS]
 
bool m_aTeamSentStartWarning [NUM_DDRACE_TEAMS]
 
int m_aTeamUnfinishableKillTick [NUM_DDRACE_TEAMS]
 
class CGameContextm_pGameContext
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TEAMSTATE_EMPTY 
TEAMSTATE_OPEN 
TEAMSTATE_STARTED 
TEAMSTATE_STARTED_UNFINISHABLE 
TEAMSTATE_FINISHED 

Constructor & Destructor Documentation

◆ CGameTeams()

CGameTeams::CGameTeams ( CGameContext pGameContext)

Member Function Documentation

◆ ChangeTeamState()

void CGameTeams::ChangeTeamState ( int  Team,
int  State 
)

◆ Character()

CCharacter * CGameTeams::Character ( int  ClientId)
inline

◆ CheckTeamFinished()

void CGameTeams::CheckTeamFinished ( int  Team)

◆ Count()

int CGameTeams::Count ( int  Team) const

◆ GameServer()

class CGameContext * CGameTeams::GameServer ( )
inline

◆ GetCurrentTimeCp()

float * CGameTeams::GetCurrentTimeCp ( CPlayer Player)

◆ GetDDRaceState()

int CGameTeams::GetDDRaceState ( CPlayer Player)

◆ GetFirstEmptyTeam()

int CGameTeams::GetFirstEmptyTeam ( ) const

◆ GetPlayer()

CPlayer * CGameTeams::GetPlayer ( int  ClientId)
inline

◆ GetSaving()

bool CGameTeams::GetSaving ( int  TeamId)
inline

◆ GetStartTime()

int CGameTeams::GetStartTime ( CPlayer Player)

◆ GetTeamState()

int CGameTeams::GetTeamState ( int  Team)
inline

◆ IsInvited()

bool CGameTeams::IsInvited ( int  Team,
int  ClientId 
)
inline

◆ IsPractice()

bool CGameTeams::IsPractice ( int  Team)
inline

◆ IsStarted()

bool CGameTeams::IsStarted ( int  Team)
inline

◆ KillSavedTeam()

void CGameTeams::KillSavedTeam ( int  ClientId,
int  Team 
)

◆ KillTeam()

void CGameTeams::KillTeam ( int  Team,
int  NewStrongId,
int  ExceptId = -1 
)
private

Kill the whole team.

Parameters
TeamThe team id to kill
NewStrongIdThe player with that id will get strong hook on everyone else, -1 will set the normal spawning order
ExceptIdThe player that should not get killed

◆ OnCharacterDeath()

void CGameTeams::OnCharacterDeath ( int  ClientId,
int  Weapon 
)

◆ OnCharacterFinish()

void CGameTeams::OnCharacterFinish ( int  ClientId)

◆ OnCharacterSpawn()

void CGameTeams::OnCharacterSpawn ( int  ClientId)

◆ OnCharacterStart()

void CGameTeams::OnCharacterStart ( int  ClientId)

◆ OnFinish()

void CGameTeams::OnFinish ( CPlayer Player,
int  TimeTicks,
const char *  pTimestamp 
)
private

◆ OnTeamFinish()

void CGameTeams::OnTeamFinish ( int  Team,
CPlayer **  Players,
unsigned int  Size,
int  TimeTicks,
const char *  pTimestamp 
)
private

◆ ProcessSaveTeam()

void CGameTeams::ProcessSaveTeam ( )

◆ RequestTeamSwap()

void CGameTeams::RequestTeamSwap ( CPlayer pPlayer,
CPlayer pTargetPlayer,
int  Team 
)

◆ Reset()

void CGameTeams::Reset ( )

◆ ResetInvited()

void CGameTeams::ResetInvited ( int  Team)

◆ ResetRoundState()

void CGameTeams::ResetRoundState ( int  Team)

◆ ResetSavedTeam()

void CGameTeams::ResetSavedTeam ( int  ClientId,
int  Team 
)

◆ ResetSwitchers()

void CGameTeams::ResetSwitchers ( int  Team)

◆ SendTeamsState()

void CGameTeams::SendTeamsState ( int  ClientId)

◆ Server()

class IServer * CGameTeams::Server ( )
inline

◆ SetCharacterTeam()

const char * CGameTeams::SetCharacterTeam ( int  ClientId,
int  Team 
)

◆ SetClientInvited()

void CGameTeams::SetClientInvited ( int  Team,
int  ClientId,
bool  Invited 
)

◆ SetDDRaceState()

void CGameTeams::SetDDRaceState ( CPlayer Player,
int  DDRaceState 
)

◆ SetFinished()

void CGameTeams::SetFinished ( int  ClientId,
bool  Finished 
)
inline

◆ SetForceCharacterTeam()

void CGameTeams::SetForceCharacterTeam ( int  ClientId,
int  Team 
)

◆ SetLastTimeCp()

void CGameTeams::SetLastTimeCp ( CPlayer Player,
int  LastTimeCp 
)

◆ SetPractice()

void CGameTeams::SetPractice ( int  Team,
bool  Enabled 
)
inline

◆ SetSaving()

void CGameTeams::SetSaving ( int  TeamId,
std::shared_ptr< CScoreSaveResult > &  SaveResult 
)
inline

◆ SetStarted()

void CGameTeams::SetStarted ( int  ClientId,
bool  Started 
)
inline

◆ SetStartTime()

void CGameTeams::SetStartTime ( CPlayer Player,
int  StartTime 
)

◆ SetTeamFlock()

void CGameTeams::SetTeamFlock ( int  Team,
bool  Mode 
)

◆ SetTeamLock()

void CGameTeams::SetTeamLock ( int  Team,
bool  Lock 
)

◆ SwapTeamCharacters()

void CGameTeams::SwapTeamCharacters ( CPlayer pPrimaryPlayer,
CPlayer pTargetPlayer,
int  Team 
)

◆ TeamFinished()

bool CGameTeams::TeamFinished ( int  Team)
private

◆ TeamFlock()

bool CGameTeams::TeamFlock ( int  Team)
inline

◆ TeamLocked()

bool CGameTeams::TeamLocked ( int  Team)
inline

◆ TeamMask()

CClientMask CGameTeams::TeamMask ( int  Team,
int  ExceptId = -1,
int  Asker = -1,
int  VersionFlags = CGameContext::FLAG_SIX | CGameContext::FLAG_SIXUP 
)

◆ TeeFinished()

bool CGameTeams::TeeFinished ( int  ClientId)
inline

◆ TeeStarted()

bool CGameTeams::TeeStarted ( int  ClientId)
inline

◆ Tick()

void CGameTeams::Tick ( )

Member Data Documentation

◆ m_aInvited

CClientMask CGameTeams::m_aInvited[NUM_DDRACE_TEAMS]
private

◆ m_aLastChat

int CGameTeams::m_aLastChat[MAX_CLIENTS]
private

◆ m_aLastSwap

uint64_t CGameTeams::m_aLastSwap[MAX_CLIENTS]
private

◆ m_aPractice

bool CGameTeams::m_aPractice[NUM_DDRACE_TEAMS]
private

◆ m_apSaveTeamResult

std::shared_ptr<CScoreSaveResult> CGameTeams::m_apSaveTeamResult[NUM_DDRACE_TEAMS]
private

◆ m_aTeamFlock

bool CGameTeams::m_aTeamFlock[NUM_DDRACE_TEAMS]
private

◆ m_aTeamLocked

bool CGameTeams::m_aTeamLocked[NUM_DDRACE_TEAMS]
private

◆ m_aTeamSentStartWarning

bool CGameTeams::m_aTeamSentStartWarning[NUM_DDRACE_TEAMS]
private

◆ m_aTeamState

int CGameTeams::m_aTeamState[NUM_DDRACE_TEAMS]
private

◆ m_aTeamUnfinishableKillTick

int CGameTeams::m_aTeamUnfinishableKillTick[NUM_DDRACE_TEAMS]
private

◆ m_aTeeFinished

bool CGameTeams::m_aTeeFinished[MAX_CLIENTS]
private

◆ m_aTeeStarted

bool CGameTeams::m_aTeeStarted[MAX_CLIENTS]
private

◆ m_Core

CTeamsCore CGameTeams::m_Core

◆ m_pGameContext

class CGameContext* CGameTeams::m_pGameContext
private

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