From 216967c3bf72ccff9d069327a5531e50f8f88b5a Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 17 Jan 2011 12:28:37 +0100 Subject: release gameclient components when opening the editor. Closes #429 --- src/engine/client/client.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/engine/client/client.cpp') diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index d67e3332..9b8c4151 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -414,6 +414,7 @@ CClient::CClient() : m_DemoPlayer(&m_SnapshotDelta), m_DemoRecorder(&m_SnapshotD m_WindowMustRefocus = 0; m_SnapCrcErrors = 0; m_AutoScreenshotRecycle = false; + m_EditorActive = false; m_AckGameTick = -1; m_CurrentRecvTick = 0; @@ -1914,12 +1915,21 @@ void CClient::Run() // render if(g_Config.m_ClEditor) { + if(!m_EditorActive) + { + GameClient()->OnActivateEditor(); + m_EditorActive = true; + } + Update(); m_pEditor->UpdateAndRender(); m_pGraphics->Swap(); } else { + if(m_EditorActive) + m_EditorActive = false; + Update(); if(g_Config.m_DbgStress) -- cgit 1.4.1