about summary refs log tree commit diff
path: root/src/game/client/gc_console.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-29 21:39:41 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-29 21:39:41 +0000
commit7bc733dc10f3d01985021b7b5d6ae140dd5af6f1 (patch)
treec9b0fcd8d128ec9abd40c10dfe4fcf245650a870 /src/game/client/gc_console.cpp
parent0dab7db963e2706182ea120c98f746f5e265c14c (diff)
downloadzcatch-7bc733dc10f3d01985021b7b5d6ae140dd5af6f1.tar.gz
zcatch-7bc733dc10f3d01985021b7b5d6ae140dd5af6f1.zip
large update. cleaned up some code. added new effects for almost everything
Diffstat (limited to 'src/game/client/gc_console.cpp')
-rw-r--r--src/game/client/gc_console.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/client/gc_console.cpp b/src/game/client/gc_console.cpp
index 9cf417e2..0a4bb3d6 100644
--- a/src/game/client/gc_console.cpp
+++ b/src/game/client/gc_console.cpp
@@ -12,6 +12,7 @@ extern "C" {
 #include <cstdio>
 
 #include "gc_ui.h"
+#include "gc_client.h"
 
 static unsigned int console_input_len = 0;
 static char console_input[256] = {0};
@@ -57,12 +58,20 @@ static void quit_command(struct lexer_result *result, void *user_data)
 	client_quit();
 }
 
+static void con_team(struct lexer_result *result, void *user_data)
+{
+	int new_team;
+	extract_result_int(result, 1, &new_team);
+	send_switch_team(new_team);
+}
+
 void client_console_init()
 {
 	console_register_print_callback(client_console_print);
 	MACRO_REGISTER_COMMAND("quit", "", quit_command, 0x0);
 	MACRO_REGISTER_COMMAND("connect", "s", connect_command, 0x0);
 	MACRO_REGISTER_COMMAND("disconnect", "", disconnect_command, 0x0);
+	MACRO_REGISTER_COMMAND("team", "i", con_team, 0x0);
 }
 
 void console_handle_input()