2015-08-22 13:09:19 +00:00
|
|
|
/* (c) Redix and Sushi */
|
|
|
|
|
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_RACE_DEMO_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_RACE_DEMO_H
|
|
|
|
|
|
|
|
#include <game/client/gameclient.h>
|
|
|
|
|
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CRaceDemo : public CComponent
|
|
|
|
{
|
|
|
|
int m_RecordStopTime;
|
|
|
|
int m_DemoStartTick;
|
|
|
|
float m_Time;
|
|
|
|
const char *m_pMap;
|
|
|
|
|
|
|
|
void Stop();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
int m_RaceState;
|
2017-02-21 16:10:08 +00:00
|
|
|
|
2015-08-22 13:09:19 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
RACE_NONE = 0,
|
|
|
|
RACE_STARTED,
|
|
|
|
RACE_FINISHED,
|
|
|
|
};
|
2017-02-21 16:10:08 +00:00
|
|
|
|
2015-08-22 13:09:19 +00:00
|
|
|
CRaceDemo();
|
2017-02-21 16:10:08 +00:00
|
|
|
|
2015-08-22 13:09:19 +00:00
|
|
|
virtual void OnReset();
|
|
|
|
virtual void OnStateChange(int NewState, int OldState);
|
|
|
|
virtual void OnRender();
|
|
|
|
virtual void OnShutdown();
|
|
|
|
virtual void OnMessage(int MsgType, void *pRawMsg);
|
2017-02-21 16:10:08 +00:00
|
|
|
|
2015-08-22 13:09:19 +00:00
|
|
|
void CheckDemo();
|
|
|
|
void SaveDemo(const char* pDemo);
|
|
|
|
};
|
|
|
|
#endif
|