DDraceNetwork Docs
race.h
Go to the documentation of this file.
1#ifndef GAME_CLIENT_RACE_H
2#define GAME_CLIENT_RACE_H
3
4#include <base/vmath.h>
5
6class CGameClient;
7
9{
11
12 int m_aFlagIndex[2] = {-1, -1};
13
14public:
15 void Init(const CGameClient *pGameClient);
16
17 // these functions return the time in milliseconds, time -1 is invalid
18 static int TimeFromSecondsStr(const char *pStr); // x.xxx
19 static int TimeFromStr(const char *pStr); // x minute(s) x.xxx second(s)
20 static int TimeFromFinishMessage(const char *pStr, char *pNameBuf, int NameBufSize); // xxx finished in: x minute(s) x.xxx second(s)
21
22 bool IsStart(vec2 Prev, vec2 Pos) const;
23};
24
25#endif // GAME_CLIENT_RACE_H
Definition: gameclient.h:124
Definition: race.h:9
const CGameClient * m_pGameClient
Definition: race.h:10
static int TimeFromSecondsStr(const char *pStr)
Definition: race.cpp:38
static int TimeFromFinishMessage(const char *pStr, char *pNameBuf, int NameBufSize)
Definition: race.cpp:80
bool IsStart(vec2 Prev, vec2 Pos) const
Definition: race.cpp:96
int m_aFlagIndex[2]
Definition: race.h:12
static int TimeFromStr(const char *pStr)
Definition: race.cpp:57
void Init(const CGameClient *pGameClient)
Definition: race.cpp:10