DDraceNetwork Documentation
Loading...
Searching...
No Matches
CRaceDemo Class Reference

#include <race_demo.h>

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

Public Member Functions

 CRaceDemo ()
int Sizeof () const override
void OnReset () override
void OnStateChange (int NewState, int OldState) override
void OnMessage (int MsgType, void *pRawMsg) override
void OnMapLoad () override
void OnShutdown () override
void OnNewSnapshot () override
Public Member Functions inherited from CComponent
virtual void OnConsoleInit ()
virtual void OnInit ()
virtual void OnWindowResize ()
virtual void OnUpdate ()
virtual void OnRender ()
virtual void OnRelease ()
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
virtual bool OnInput (const IInput::CEvent &Event)
virtual bool OnTouchState (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Public Member Functions inherited from CComponentInterfaces
virtual void OnInterfacesInit (CGameClient *pClient)
virtual ~CComponentInterfaces ()=default

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 CComponentInterfaces
class CGameClientGameClient () const
class IClientClient () const
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 CRenderMapRenderMap () 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

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()

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: