| 1 | #ifndef GAME_CLIENT_RACE_H |
| 2 | #define GAME_CLIENT_RACE_H |
| 3 | |
| 4 | #include <base/vmath.h> |
| 5 | |
| 6 | class CGameClient; |
| 7 | |
| 8 | class CRaceHelper |
| 9 | { |
| 10 | const CGameClient *m_pGameClient; |
| 11 | |
| 12 | int m_aFlagIndex[2] = {-1, -1}; |
| 13 | |
| 14 | public: |
| 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 |
| 26 | |