DDraceNetwork Docs
CTeeHistorian Class Reference

#include <teehistorian.h>

Collaboration diagram for CTeeHistorian:
[legend]

Classes

struct  CGameInfo
 
struct  CTeam
 
struct  CTeehistorianPlayer
 

Public Types

enum  { PROTOCOL_6 = 1 , PROTOCOL_7 }
 
typedef void(* WRITE_CALLBACK) (const void *pData, int DataSize, void *pUser)
 

Public Member Functions

 CTeeHistorian ()
 
void Reset (const CGameInfo *pGameInfo, WRITE_CALLBACK pfnWriteCallback, void *pUser)
 
void Finish ()
 
bool Starting () const
 
void BeginTick (int Tick)
 
void BeginPlayers ()
 
void RecordPlayer (int ClientId, const CNetObj_CharacterCore *pChar)
 
void RecordDeadPlayer (int ClientId)
 
void RecordPlayerTeam (int ClientId, int Team)
 
void RecordTeamPractice (int Team, bool Practice)
 
void EndPlayers ()
 
void BeginInputs ()
 
void RecordPlayerInput (int ClientId, uint32_t UniqueClientId, const CNetObj_PlayerInput *pInput)
 
void RecordPlayerMessage (int ClientId, const void *pMsg, int MsgSize)
 
void RecordPlayerJoin (int ClientId, int Protocol)
 
void RecordPlayerRejoin (int ClientId)
 
void RecordPlayerReady (int ClientId)
 
void RecordPlayerDrop (int ClientId, const char *pReason)
 
void RecordPlayerName (int ClientId, const char *pName)
 
void RecordConsoleCommand (int ClientId, int FlagMask, const char *pCmd, IConsole::IResult *pResult)
 
void RecordTestExtra ()
 
void RecordPlayerSwap (int ClientId1, int ClientId2)
 
void RecordTeamSaveSuccess (int Team, CUuid SaveId, const char *pTeamSave)
 
void RecordTeamSaveFailure (int Team)
 
void RecordTeamLoadSuccess (int Team, CUuid SaveId, const char *pTeamSave)
 
void RecordTeamLoadFailure (int Team)
 
void EndInputs ()
 
void EndTick ()
 
void RecordDDNetVersionOld (int ClientId, int DDNetVersion)
 
void RecordDDNetVersion (int ClientId, CUuid ConnectionId, int DDNetVersion, const char *pDDNetVersionStr)
 
void RecordAuthInitial (int ClientId, int Level, const char *pAuthName)
 
void RecordAuthLogin (int ClientId, int Level, const char *pAuthName)
 
void RecordAuthLogout (int ClientId)
 
void RecordAntibot (const void *pData, int DataSize)
 
void RecordPlayerFinish (int ClientId, int TimeTicks)
 
void RecordTeamFinish (int TeamId, int TimeTicks)
 

Public Attributes

int m_Debug
 

Private Types

enum  {
  STATE_START , STATE_BEFORE_TICK , STATE_BEFORE_PLAYERS , STATE_PLAYERS ,
  STATE_BEFORE_INPUTS , STATE_INPUTS , STATE_BEFORE_ENDTICK , NUM_STATES
}
 

Private Member Functions

void WriteHeader (const CGameInfo *pGameInfo)
 
void WriteExtra (CUuid Uuid, const void *pData, int DataSize)
 
void EnsureTickWrittenPlayerData (int ClientId)
 
void EnsureTickWritten ()
 
void WriteTick ()
 
void Write (const void *pData, int DataSize)
 

Private Attributes

WRITE_CALLBACK m_pfnWriteCallback
 
void * m_pWriteCallbackUserdata
 
int m_State
 
int m_LastWrittenTick
 
bool m_TickWritten
 
int m_Tick
 
int m_PrevMaxClientId
 
int m_MaxClientId
 
CTeehistorianPlayer m_aPrevPlayers [MAX_CLIENTS]
 
CTeam m_aPrevTeams [MAX_CLIENTS]
 

Member Typedef Documentation

◆ WRITE_CALLBACK

typedef void(* CTeeHistorian::WRITE_CALLBACK) (const void *pData, int DataSize, void *pUser)

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROTOCOL_6 
PROTOCOL_7 

◆ anonymous enum

anonymous enum
private
Enumerator
STATE_START 
STATE_BEFORE_TICK 
STATE_BEFORE_PLAYERS 
STATE_PLAYERS 
STATE_BEFORE_INPUTS 
STATE_INPUTS 
STATE_BEFORE_ENDTICK 
NUM_STATES 

Constructor & Destructor Documentation

◆ CTeeHistorian()

CTeeHistorian::CTeeHistorian ( )

Member Function Documentation

◆ BeginInputs()

void CTeeHistorian::BeginInputs ( )

◆ BeginPlayers()

void CTeeHistorian::BeginPlayers ( )

◆ BeginTick()

void CTeeHistorian::BeginTick ( int  Tick)

◆ EndInputs()

void CTeeHistorian::EndInputs ( )

◆ EndPlayers()

void CTeeHistorian::EndPlayers ( )

◆ EndTick()

void CTeeHistorian::EndTick ( )

◆ EnsureTickWritten()

void CTeeHistorian::EnsureTickWritten ( )
private

◆ EnsureTickWrittenPlayerData()

void CTeeHistorian::EnsureTickWrittenPlayerData ( int  ClientId)
private

◆ Finish()

void CTeeHistorian::Finish ( )

◆ RecordAntibot()

void CTeeHistorian::RecordAntibot ( const void *  pData,
int  DataSize 
)

◆ RecordAuthInitial()

void CTeeHistorian::RecordAuthInitial ( int  ClientId,
int  Level,
const char *  pAuthName 
)

◆ RecordAuthLogin()

void CTeeHistorian::RecordAuthLogin ( int  ClientId,
int  Level,
const char *  pAuthName 
)

◆ RecordAuthLogout()

void CTeeHistorian::RecordAuthLogout ( int  ClientId)

◆ RecordConsoleCommand()

void CTeeHistorian::RecordConsoleCommand ( int  ClientId,
int  FlagMask,
const char *  pCmd,
IConsole::IResult pResult 
)

◆ RecordDDNetVersion()

void CTeeHistorian::RecordDDNetVersion ( int  ClientId,
CUuid  ConnectionId,
int  DDNetVersion,
const char *  pDDNetVersionStr 
)

◆ RecordDDNetVersionOld()

void CTeeHistorian::RecordDDNetVersionOld ( int  ClientId,
int  DDNetVersion 
)

◆ RecordDeadPlayer()

void CTeeHistorian::RecordDeadPlayer ( int  ClientId)

◆ RecordPlayer()

void CTeeHistorian::RecordPlayer ( int  ClientId,
const CNetObj_CharacterCore pChar 
)

◆ RecordPlayerDrop()

void CTeeHistorian::RecordPlayerDrop ( int  ClientId,
const char *  pReason 
)

◆ RecordPlayerFinish()

void CTeeHistorian::RecordPlayerFinish ( int  ClientId,
int  TimeTicks 
)

◆ RecordPlayerInput()

void CTeeHistorian::RecordPlayerInput ( int  ClientId,
uint32_t  UniqueClientId,
const CNetObj_PlayerInput pInput 
)

◆ RecordPlayerJoin()

void CTeeHistorian::RecordPlayerJoin ( int  ClientId,
int  Protocol 
)

◆ RecordPlayerMessage()

void CTeeHistorian::RecordPlayerMessage ( int  ClientId,
const void *  pMsg,
int  MsgSize 
)

◆ RecordPlayerName()

void CTeeHistorian::RecordPlayerName ( int  ClientId,
const char *  pName 
)

◆ RecordPlayerReady()

void CTeeHistorian::RecordPlayerReady ( int  ClientId)

◆ RecordPlayerRejoin()

void CTeeHistorian::RecordPlayerRejoin ( int  ClientId)

◆ RecordPlayerSwap()

void CTeeHistorian::RecordPlayerSwap ( int  ClientId1,
int  ClientId2 
)

◆ RecordPlayerTeam()

void CTeeHistorian::RecordPlayerTeam ( int  ClientId,
int  Team 
)

◆ RecordTeamFinish()

void CTeeHistorian::RecordTeamFinish ( int  TeamId,
int  TimeTicks 
)

◆ RecordTeamLoadFailure()

void CTeeHistorian::RecordTeamLoadFailure ( int  Team)

◆ RecordTeamLoadSuccess()

void CTeeHistorian::RecordTeamLoadSuccess ( int  Team,
CUuid  SaveId,
const char *  pTeamSave 
)

◆ RecordTeamPractice()

void CTeeHistorian::RecordTeamPractice ( int  Team,
bool  Practice 
)

◆ RecordTeamSaveFailure()

void CTeeHistorian::RecordTeamSaveFailure ( int  Team)

◆ RecordTeamSaveSuccess()

void CTeeHistorian::RecordTeamSaveSuccess ( int  Team,
CUuid  SaveId,
const char *  pTeamSave 
)

◆ RecordTestExtra()

void CTeeHistorian::RecordTestExtra ( )

◆ Reset()

void CTeeHistorian::Reset ( const CGameInfo pGameInfo,
WRITE_CALLBACK  pfnWriteCallback,
void *  pUser 
)

◆ Starting()

bool CTeeHistorian::Starting ( ) const
inline

◆ Write()

void CTeeHistorian::Write ( const void *  pData,
int  DataSize 
)
private

◆ WriteExtra()

void CTeeHistorian::WriteExtra ( CUuid  Uuid,
const void *  pData,
int  DataSize 
)
private

◆ WriteHeader()

void CTeeHistorian::WriteHeader ( const CGameInfo pGameInfo)
private

◆ WriteTick()

void CTeeHistorian::WriteTick ( )
private

Member Data Documentation

◆ m_aPrevPlayers

CTeehistorianPlayer CTeeHistorian::m_aPrevPlayers[MAX_CLIENTS]
private

◆ m_aPrevTeams

CTeam CTeeHistorian::m_aPrevTeams[MAX_CLIENTS]
private

◆ m_Debug

int CTeeHistorian::m_Debug

◆ m_LastWrittenTick

int CTeeHistorian::m_LastWrittenTick
private

◆ m_MaxClientId

int CTeeHistorian::m_MaxClientId
private

◆ m_pfnWriteCallback

WRITE_CALLBACK CTeeHistorian::m_pfnWriteCallback
private

◆ m_PrevMaxClientId

int CTeeHistorian::m_PrevMaxClientId
private

◆ m_pWriteCallbackUserdata

void* CTeeHistorian::m_pWriteCallbackUserdata
private

◆ m_State

int CTeeHistorian::m_State
private

◆ m_Tick

int CTeeHistorian::m_Tick
private

◆ m_TickWritten

bool CTeeHistorian::m_TickWritten
private

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