DDraceNetwork Docs
CRaceDemo Class Reference

#include <race_demo.h>

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

Public Member Functions

 CRaceDemo ()
 
virtual int Sizeof () const override
 
virtual void OnReset () override
 
virtual void OnStateChange (int NewState, int OldState) override
 
virtual void OnMessage (int MsgType, void *pRawMsg) override
 
virtual void OnMapLoad () override
 
virtual void OnShutdown () override
 
virtual void OnNewSnapshot () override
 
- Public Member Functions inherited from CComponent
virtual ~CComponent ()
 
virtual int Sizeof () const =0
 
class CGameClientGameClient () const
 
class IClientClient () const
 
virtual void OnStateChange (int NewState, int OldState)
 
virtual void OnConsoleInit ()
 
virtual void OnInit ()
 
virtual void OnShutdown ()
 
virtual void OnReset ()
 
virtual void OnWindowResize ()
 
virtual void OnRefreshSkins ()
 
virtual void OnRender ()
 
virtual void OnNewSnapshot ()
 
virtual void OnRelease ()
 
virtual void OnMapLoad ()
 
virtual void OnMessage (int Msg, void *pRawMsg)
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
 
virtual bool OnInput (const IInput::CEvent &Event)
 

Public Attributes

bool m_AllowRestart
 

Private Types

enum  {
  RACE_NONE = 0 , RACE_IDLE , RACE_PREPARE , RACE_STARTED ,
  RACE_FINISHED
}
 

Private Member Functions

void GetPath (char *pBuf, int Size, int Time=-1) const
 
void StopRecord (int Time=-1)
 
bool CheckDemo (int Time)
 

Static Private Member Functions

static int RaceDemolistFetchCallback (const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser)
 

Private Attributes

char m_aTmpFilename [128]
 
int m_RaceState
 
int m_RaceStartTick
 
int m_RecordStopTick
 
int m_Time
 
std::chrono::nanoseconds m_RaceDemosLoadStartTime {0}
 

Static Private Attributes

static const char * ms_pRaceDemoDir = "demos/auto/race"
 

Additional Inherited Members

- Protected Member Functions inherited from CComponent
class IKernelKernel () const
 
class IEngineEngine () const
 
class IGraphicsGraphics () const
 
class ITextRenderTextRender () const
 
class IInputInput () const
 
class IStorageStorage () const
 
class CUiUi () const
 
class ISoundSound () const
 
class CRenderToolsRenderTools () const
 
class IConfigManagerConfigManager () const
 
class CConfigConfig () const
 
class IConsoleConsole () const
 
class IDemoPlayerDemoPlayer () const
 
class IDemoRecorderDemoRecorder (int Recorder) const
 
class IFavoritesFavorites () const
 
class IServerBrowserServerBrowser () const
 
class CLayersLayers () const
 
class CCollisionCollision () const
 
int64_t time () const
 
float LocalTime () const
 
class IHttpHttp () const
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
RACE_NONE 
RACE_IDLE 
RACE_PREPARE 
RACE_STARTED 
RACE_FINISHED 

Constructor & Destructor Documentation

◆ CRaceDemo()

CRaceDemo::CRaceDemo ( )

Member Function Documentation

◆ CheckDemo()

bool CRaceDemo::CheckDemo ( int  Time)
private

◆ GetPath()

void CRaceDemo::GetPath ( char *  pBuf,
int  Size,
int  Time = -1 
) const
private

◆ OnMapLoad()

void CRaceDemo::OnMapLoad ( )
overridevirtual

Called on map load.

Reimplemented from CComponent.

◆ OnMessage()

void CRaceDemo::OnMessage ( int  Msg,
void *  pRawMsg 
)
overridevirtual

Called when receiving a network message.

Parameters
MsgThe message type.
pRawMsgThe message data.
See also
NETMSGTYPE_SV_DDRACETIME
CNetMsg_Sv_DDRaceTime

Reimplemented from CComponent.

◆ OnNewSnapshot()

void CRaceDemo::OnNewSnapshot ( )
overridevirtual

Called when a new snapshot is received.

Reimplemented from CComponent.

◆ OnReset()

void CRaceDemo::OnReset ( )
overridevirtual

Called to reset the component. This method is usually called on your component constructor to avoid code duplication.

See also
CHud::CHud()
CHud::OnReset()

Reimplemented from CComponent.

◆ OnShutdown()

void CRaceDemo::OnShutdown ( )
overridevirtual

Called to cleanup the component. This method is called when the client is closed.

Reimplemented from CComponent.

◆ OnStateChange()

void CRaceDemo::OnStateChange ( int  NewState,
int  OldState 
)
overridevirtual

This method is called when the client changes state, e.g from offline to online.

See also
IClient::STATE_CONNECTING
IClient::STATE_LOADING
IClient::STATE_ONLINE

Reimplemented from CComponent.

◆ RaceDemolistFetchCallback()

int CRaceDemo::RaceDemolistFetchCallback ( const CFsFileInfo pInfo,
int  IsDir,
int  StorageType,
void *  pUser 
)
staticprivate

◆ Sizeof()

virtual int CRaceDemo::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ StopRecord()

void CRaceDemo::StopRecord ( int  Time = -1)
private

Member Data Documentation

◆ m_AllowRestart

bool CRaceDemo::m_AllowRestart

◆ m_aTmpFilename

char CRaceDemo::m_aTmpFilename[128]
private

◆ m_RaceDemosLoadStartTime

std::chrono::nanoseconds CRaceDemo::m_RaceDemosLoadStartTime {0}
private

◆ m_RaceStartTick

int CRaceDemo::m_RaceStartTick
private

◆ m_RaceState

int CRaceDemo::m_RaceState
private

◆ m_RecordStopTick

int CRaceDemo::m_RecordStopTick
private

◆ m_Time

int CRaceDemo::m_Time
private

◆ ms_pRaceDemoDir

const char * CRaceDemo::ms_pRaceDemoDir = "demos/auto/race"
staticprivate

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