//------------------------------------------------------------------------
bool CPlaylistActivityTracker::UploadData( const char* pUrlPath, const char* pUrlParams, int receiveSize, ERequestTaskType taskType )
{
    CDownloadableResourcePtr newResource = new CDownloadableResource;

    newResource->SetDownloadInfo( pUrlParams, pUrlPath, m_serverNameCVar->GetString(), m_serverPortCVar->GetIVal(), receiveSize, "PlaylistRequest" );
    newResource->AddDataListener( this );
    m_downloadableResources[ taskType ] = newResource;

    return true;
}
Beispiel #2
0
CAntiCheatManager::CAntiCheatManager()
: m_pLogFile(NULL)
, m_decayRate(100.f)
, m_hashMethod(0)
, m_totalAssetWeighting(0)
, m_enableLogUploads(true)
, m_uChatMsgsSent(0)
, m_uIncidents(0)
{
	ResetAntiCheatVars();

	int instance = gEnv->pSystem->GetApplicationInstance();
	if(instance != 0)
	{
		m_logFileName.Format("./%sAntiCheatLog(%d).xml", gEnv->pSystem->GetRootFolder(), instance);
	}
	else
	{
		m_logFileName.Format("./%sAntiCheatLog.xml", gEnv->pSystem->GetRootFolder());
	}

	ParseAntiCheatConfig("Scripts/DedicatedConfigs/AntiCheatConfig.xml");

#if defined(_RELEASE)
	CDownloadableResourcePtr res = GetDownloadableResource();
	if (res)
	{
		res->AddDataListener(this);
	}
#endif

	m_lastDownloadTime = gEnv->pTimer->GetAsyncTime();

	//Examples of usage

	/*FlagActivity(eCT_WeaponDamage, 5641, 4, 300);
	FlagActivity(eCT_WeaponDamage, 5641, 2, 300);
	FlagActivity(eCT_WeaponDamage, 5641, 4, 100);
	FlagActivity(eCT_PlayerSpeed, 6465, 40);
	FlagActivity(eCT_PlayerSpeed, 6465, 100);
	FlagActivity(eCT_AmmoUsed, 8489);*/

}