about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-01-17 12:28:37 +0100
committeroy <Tom_Adams@web.de>2011-01-17 12:28:37 +0100
commit216967c3bf72ccff9d069327a5531e50f8f88b5a (patch)
treeedda4389c670ddbb9e37885a948f5231babbf496 /src/engine/client/client.cpp
parent5483eb66294aabea76624659886a7c39a0758e66 (diff)
downloadzcatch-216967c3bf72ccff9d069327a5531e50f8f88b5a.tar.gz
zcatch-216967c3bf72ccff9d069327a5531e50f8f88b5a.zip
release gameclient components when opening the editor. Closes #429
Diffstat (limited to 'src/engine/client/client.cpp')
-rw-r--r--src/engine/client/client.cpp10
1 files changed, 10 insertions, 0 deletions
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)