Beispiel #1
0
void CTimer::Start(int start)
{
    if (m_bUsingCPMenu) return;
    m_iStartTick = start;
    SetRunning(true);
    DispatchStateMessage();
}
Beispiel #2
0
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();
}
Beispiel #3
0
void CTimer::Start(int start)
{
    m_iStartTick = start;
    SetRunning(true);
    DispatchStateMessage();
}
Beispiel #4
0
void CTimer::Stop()
{
	SetRunning(false);
	DispatchStateMessage();
}