From 4fde2cf7f2353c045bcf483e7958d785dac3be64 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 9 Jan 2012 00:49:20 +0100 Subject: add tuning to demo. Closes #899 --- src/game/client/gameclient.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game/client') diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 6e94c830..467a55a0 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -893,6 +893,15 @@ void CGameClient::OnNewSnapshot() m_ServerMode = SERVERMODE_PUREMOD; } + // add tuning to demo + if(DemoRecorder()->IsRecording() && mem_comp(&StandardTuning, &m_Tuning, sizeof(CTuningParams)) != 0) + { + CMsgPacker Msg(NETMSGTYPE_SV_TUNEPARAMS); + int *pParams = (int *)&m_Tuning; + for(unsigned i = 0; i < sizeof(m_Tuning)/sizeof(int); i++) + Msg.AddInt(pParams[i]); + Client()->SendMsg(&Msg, MSGFLAG_RECORD|MSGFLAG_NOSEND); + } } void CGameClient::OnPredict() -- cgit 1.4.1