//----------------------------------------------------------------------------- // Copyright(c), HL Rally: Source, 2004, All rights reserved. // The contents of this file may only be used / distributed in accordance // with the conditions listed in the supplied license, or with written // permission of the respective authors listed. //----------------------------------------------------------------------------- #ifndef ENTITYINFOCHECKPOINT_H #define ENTITYINFOCHECKPOINT_H #define MAX_NUM_LAPS 32 // CEntityInfoCheckpoint class CEntityInfoCheckpoint : public CBaseEntity { public: DECLARE_CLASS(CEntityInfoCheckpoint, CBaseEntity); DECLARE_DATADESC(); CEntityInfoCheckpoint(); virtual ~CEntityInfoCheckpoint(); virtual void Reset(); virtual void Precache(); virtual void Spawn(); virtual void StartTouch(CBaseEntity *pBase); // Accessors int GetTouchOrder(); int GetTimeExtension(); int GetTimeExtensionReverse(); protected: int m_iTouchOrder; int m_iTimeExtension; int m_iTimeExtensionReverse; // Info on players that have touched this instance of entity typedef struct TouchInfo_s { bool m_bTouchedThisLap; int m_iTime; } TouchInfo_t; // TouchInfo Vector - m_vecTouchInfo[iLapNumber][iPlayerIndex] TouchInfo_t m_vecTouchInfo[MAX_NUM_LAPS][MAX_PLAYERS]; static int ms_iTotalCheckpoints; }; #endif