ddnet/src/game/client/components/race_demo.h
noother 901859a494 fixed all known bugs in racedemos & ghosts, including "ghost is shown when playing a demo", "ghost doesn't reset when crossing the startline
again" (this conflicts with racemod however, where the time isn't reset on crossing the start tiles again. This should be removed in
DDRace.), "ghost sometimes doesn't save"  (this was because of kill tiles right next to finish tiles, and it just wasn't quick enough when
going through them fast), "demos contain a lot of garbage before the actual run (prior attempts)" ghosts and racedemos should now work 100%
2011-02-16 10:39:26 +02:00

39 lines
654 B
C++

/* (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;
public:
int m_RaceState;
enum
{
RACE_NONE = 0,
RACE_STARTED,
RACE_FINISHED,
};
CRaceDemo();
virtual void OnReset();
virtual void OnRender();
virtual void OnShutdown();
virtual void OnMessage(int MsgType, void *pRawMsg);
void CheckDemo();
void SaveDemo(const char* pDemo);
};
#endif