Skip to content

Instantly share code, notes, and snippets.

@larsfu
Created June 20, 2010 11:10
Show Gist options
  • Save larsfu/445754 to your computer and use it in GitHub Desktop.
Save larsfu/445754 to your computer and use it in GitHub Desktop.
const char *CClient::DemoRecorder_Start(const char *pFilename)
{
if(State() != IClient::STATE_ONLINE)
dbg_msg("demorec/record", "client is not online");
else
{
char aFilename[512];
str_format(aFilename, sizeof(aFilename), "demos/%s.demo", pFilename);
m_DemoRecorder.Start(Storage(), aFilename, GameClient()->NetVersion(), m_aCurrentMap, m_CurrentMapCrc, "client");
}
return 0;
}
void CClient::Con_Record(IConsole::IResult *pResult, void *pUserData)
{
CClient *pSelf = (CClient *)pUserData;
pSelf->DemoRecorder_Start(pResult->GetString(0));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment