about summary refs log tree commit diff
path: root/src/game/client/components/console.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-06-05 13:38:08 +0200
committerMagnus Auvinen <magnus.auvinen@gmail.com>2010-06-06 17:16:52 +0200
commita41d930a85f31064965d89115d851518d568f175 (patch)
treea610acd394464ec39139c27df2bd7e194875a34f /src/game/client/components/console.cpp
parent7d03e70d1e6b0cd0b55c741d90b33fd4e2e51cb5 (diff)
downloadzcatch-a41d930a85f31064965d89115d851518d568f175.tar.gz
zcatch-a41d930a85f31064965d89115d851518d568f175.zip
fixed some compiler warnings. Closes #76
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>();
 	
 	//