about summary refs log tree commit diff
path: root/src/game/client/components/console.cpp
diff options
context:
space:
mode:
authorFujnky <larsfunke1996@gmail.com>2010-06-07 16:00:01 +0200
committerFujnky <larsfunke1996@gmail.com>2010-06-07 16:00:01 +0200
commit7cc7c8f84eba9d9c103e6cc393da9c0fab41cf16 (patch)
tree4a308559ece64a7c90328432fd3956021ffb2e3d /src/game/client/components/console.cpp
parent34bd0a09b7b57fb83f7cc44ea880387538102bf4 (diff)
parent04b6abae93c809efeeb4f6b2e9d8eb80a48b1686 (diff)
downloadzcatch-7cc7c8f84eba9d9c103e6cc393da9c0fab41cf16.tar.gz
zcatch-7cc7c8f84eba9d9c103e6cc393da9c0fab41cf16.zip
Merged with master
Diffstat (limited to 'src/game/client/components/console.cpp')
-rw-r--r--src/game/client/components/console.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp
index 742b6b2d..b323ab48 100644
--- a/src/game/client/components/console.cpp
+++ b/src/game/client/components/console.cpp
@@ -34,9 +34,8 @@ enum
 	CONSOLE_CLOSING,
 };
 
-CGameConsole::CInstance::CInstance(CGameConsole *pGameConsole, int Type)
+CGameConsole::CInstance::CInstance(int Type)
 {
-	m_pGameConsole = pGameConsole;
 	// init ringbuffers
 	//history = ringbuf_init(history_data, sizeof(history_data), RINGBUF_FLAG_RECYCLE);
 	//backlog = ringbuf_init(backlog_data, sizeof(backlog_data), RINGBUF_FLAG_RECYCLE);
@@ -56,6 +55,11 @@ CGameConsole::CInstance::CInstance(CGameConsole *pGameConsole, int Type)
 	m_pCommand = 0x0;
 }
 
+void CGameConsole::CInstance::Init(CGameConsole *pGameConsole)
+{
+	m_pGameConsole = pGameConsole;
+};
+
 void CGameConsole::CInstance::ExecuteLine(const char *pLine)
 {
 	if(m_Type == 0)
@@ -198,7 +202,7 @@ void CGameConsole::CInstance::PrintLine(const char *pLine)
 }
 
 CGameConsole::CGameConsole()
-: m_LocalConsole(this, 0), m_RemoteConsole(this, 1)
+: m_LocalConsole(0), m_RemoteConsole(1)
 {
 	m_ConsoleType = 0;
 	m_ConsoleState = CONSOLE_CLOSED;
@@ -573,6 +577,10 @@ void CGameConsole::PrintLine(int Type, const char *pLine)
 
 void CGameConsole::OnConsoleInit()
 {
+	// init console instances
+	m_LocalConsole.Init(this);
+	m_RemoteConsole.Init(this);
+
 	m_pConsole = Kernel()->RequestInterface<IConsole>();
 	
 	//