void CTimer::Start(int start) { if (m_bUsingCPMenu) return; m_iStartTick = start; SetRunning(true); DispatchStateMessage(); }
void CTimer::Stop(bool endTrigger /* = false */) { if (endTrigger && !m_bWereCheatsActivated) { // Post time to leaderboards if they're online // and if cheats haven't been turned on this session if (SteamAPI_IsSteamRunning()) PostTime(); //Save times locally too, regardless of SteamAPI condition Time t; t.ticks = gpGlobals->tickcount - m_iStartTick; t.tickrate = gpGlobals->interval_per_tick; time(&t.date); localTimes.AddToTail(t); SaveTime(); } SetRunning(false); DispatchStateMessage(); }
void CTimer::Start(int start) { m_iStartTick = start; SetRunning(true); DispatchStateMessage(); }
void CTimer::Stop() { SetRunning(false); DispatchStateMessage(); }