about summary refs log tree commit diff
path: root/src/game/client/gc_hooks.cpp
diff options
context:
space:
mode:
authorJakob Fries <jakob.fries@gmail.com>2008-01-16 22:14:06 +0000
committerJakob Fries <jakob.fries@gmail.com>2008-01-16 22:14:06 +0000
commit75c8b2e9a58e7052f484e43291baa2d9ae1a384a (patch)
tree40e065a48cae7e840cc6e8f9fc9771c500910f4a /src/game/client/gc_hooks.cpp
parenta9c90d6ac082dbfea5590c54d5be7a71dd112b5d (diff)
downloadzcatch-75c8b2e9a58e7052f484e43291baa2d9ae1a384a.tar.gz
zcatch-75c8b2e9a58e7052f484e43291baa2d9ae1a384a.zip
Added first version of the console.
Diffstat (limited to 'src/game/client/gc_hooks.cpp')
-rw-r--r--src/game/client/gc_hooks.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp
index a58b554a..d70e84a5 100644
--- a/src/game/client/gc_hooks.cpp
+++ b/src/game/client/gc_hooks.cpp
@@ -17,6 +17,7 @@ extern "C" {
 #include "gc_skin.h"
 #include "gc_render.h"
 #include "gc_map_image.h"
+#include "gc_console.h"
 
 extern unsigned char internal_data[];
 
@@ -36,6 +37,8 @@ extern "C" void modc_init()
 	gfx_text_set_default_font(&default_font);
 
 	menu_init();
+
+	client_console_init();
 	
 	// setup sound channels
 	snd_set_channel(CHN_GUI, 1.0f, 0.0f);
@@ -288,10 +291,10 @@ extern "C" void modc_newsnapshot()
 		client_datas[i].update_render_info();
 }
 
-
-
 extern "C" void modc_render()
 {
+	console_handle_input();
+
 	// this should be moved around abit
 	if(client_state() == CLIENTSTATE_ONLINE)
 	{
@@ -310,6 +313,11 @@ extern "C" void modc_render()
 	else // if (client_state() != CLIENTSTATE_CONNECTING && client_state() != CLIENTSTATE_LOADING)
 	{
 		menu_render();
+		if (console_active())
+		{
+			console_render();
+			return;
+		}
 	}
 
 	//