Exemplo n.º 1
0
void CGameStats::EndRound(bool server, int winner)
{
	if(!gEnv->bServer || !server)
		return;
	m_roundStats->End(winner, gEnv->pTimer->GetFrameStartTime());
	
	if(CCryActionCVars::Get().g_statisticsMode == 1)
		SaveStats();
}
///////////////////////////////////////////////////////////////
//
// CPerfStatBandwidthUsageImpl::DoPulse
//
//
//
///////////////////////////////////////////////////////////////
void CPerfStatBandwidthUsageImpl::DoPulse ( void )
{
    long long llTime = GetTickCount64_ ();

    // Record once every 5 seconds
    if ( llTime >= m_llNextRecordTime )
    {
        m_llNextRecordTime = Max ( m_llNextRecordTime + 5000, llTime + 5000 / 10 * 9 );
        RecordStats ();
    }

    // Save once every 2 minutes
    if ( llTime >= m_llNextSaveTime )
    {
#ifdef MTA_DEBUG
        m_llNextSaveTime = llTime + 1000;
#else
        m_llNextSaveTime = llTime + 60000 * 2;
#endif
        SaveStats ();
    }
}
Exemplo n.º 3
0
void UIComms::RemoteUpdateIter(long newIter)
{
	SaveStats();
	TheCampaign.SetCreationIter(newIter);
}
///////////////////////////////////////////////////////////////
//
// CPerfStatBandwidthUsageImpl::CPerfStatBandwidthUsageImpl
//
//
//
///////////////////////////////////////////////////////////////
CPerfStatBandwidthUsageImpl::~CPerfStatBandwidthUsageImpl ( void )
{
    SaveStats ();
    g_pGame->GetDatabaseManager ()->Disconnect ( m_DatabaseConnection );
}