Ejemplo n.º 1
0
void CAntiCheatManager::CheatLogInternalXml(XmlNodeRef xmlNode)
{
	char sTime[128];
	time_t ltime;
	time( &ltime );
	struct tm *today = localtime( &ltime );
	strftime( sTime, 20, "%H:%M:%S", today );

	xmlNode->setAttr("time", sTime);

	const int64 time = gEnv->pTimer->GetFrameStartTime(ITimer::ETIMER_UI).GetMilliSecondsAsInt64();
	xmlNode->setAttr("game_time", time);


	// Print to the console and normal game log
	IXmlStringData * pXMLStringData = xmlNode->getXMLData();
	CryLog("AntiCheatManager: %s", pXMLStringData->GetString());

	// But also log to AntiCheatLog.xml which will be uploaded via telemetry
	if (m_pLogFile)
	{
		gEnv->pCryPak->FWrite(pXMLStringData->GetString(), 1, pXMLStringData->GetStringLength(), m_pLogFile);
	}

	pXMLStringData->Release();
}