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 ++++++++++ src/engine/client/client.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src/engine/client') 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) diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 406b0ac7..f25e7cf7 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -141,6 +141,7 @@ class CClient : public IClient, public CDemoPlayer::IListner int m_WindowMustRefocus; int m_SnapCrcErrors; bool m_AutoScreenshotRecycle; + bool m_EditorActive; int m_AckGameTick; int m_CurrentRecvTick; -- cgit 1.4.1