diff options
| author | oy <Tom_Adams@web.de> | 2011-01-06 23:21:51 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-06 23:21:51 +0100 |
| commit | 41b8022aa1a941a4b2f3095dd4f8600daf4cd168 (patch) | |
| tree | 5f6a37072c430f280f99de419e8fb1f27c2b496a /src/game/client/gameclient.cpp | |
| parent | eedaf62d97d1100bc4bd3dda50bfcd0c3763e812 (diff) | |
| download | zcatch-41b8022aa1a941a4b2f3095dd4f8600daf4cd168.tar.gz zcatch-41b8022aa1a941a4b2f3095dd4f8600daf4cd168.zip | |
record a new demo when a game ends. Closes #358
Diffstat (limited to 'src/game/client/gameclient.cpp')
| -rw-r--r-- | src/game/client/gameclient.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 45bd7ae3..2bebf486 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -591,6 +591,12 @@ void CGameClient::OnGameOver() Client()->AutoScreenshot_Start(); } +void CGameClient::OnStartGame() +{ + if(Client()->State() != IClient::STATE_DEMOPLAYBACK) + Client()->DemoRecorder_HandleAutoStart(); +} + void CGameClient::OnRconLine(const char *pLine) { m_pGameConsole->PrintLine(CGameConsole::CONSOLETYPE_REMOTE, pLine); @@ -781,6 +787,8 @@ void CGameClient::OnNewSnapshot() m_Snap.m_pGameobj = (CNetObj_Game *)pData; if(s_GameOver == 0 && m_Snap.m_pGameobj->m_GameOver != 0) OnGameOver(); + else if(s_GameOver != 0 && m_Snap.m_pGameobj->m_GameOver == 0) + OnStartGame(); s_GameOver = m_Snap.m_pGameobj->m_GameOver; } else if(Item.m_Type == NETOBJTYPE_FLAG) |