about summary refs log tree commit diff
path: root/src/game/client/gameclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/gameclient.cpp')
-rw-r--r--src/game/client/gameclient.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index fc17b94f..fa2f4de0 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -248,7 +248,18 @@ void GAMECLIENT::on_console_init()
 	// let all the other components register their console commands
 	for(int i = 0; i < all.num; i++)
 		all.components[i]->on_console_init();
-		
+	
+	
+	//
+	{ static COMMANDCHAIN chain; console_chain_command("player_name", &chain, conchain_special_infoupdate, this); }
+	{ static COMMANDCHAIN chain; console_chain_command("player_use_custom_color", &chain, conchain_special_infoupdate, this); }
+	{ static COMMANDCHAIN chain; console_chain_command("player_color_body", &chain, conchain_special_infoupdate, this); }
+	{ static COMMANDCHAIN chain; console_chain_command("player_color_feet", &chain, conchain_special_infoupdate, this); }
+	{ static COMMANDCHAIN chain; console_chain_command("player_skin", &chain, conchain_special_infoupdate, this); }
+	
+	
+	
+	
 	//
 	suppress_events = false;
 }
@@ -954,3 +965,10 @@ void GAMECLIENT::con_kill(void *result, void *user_data)
 {
 	((GAMECLIENT*)user_data)->send_kill(-1);
 }
+
+void GAMECLIENT::conchain_special_infoupdate(void *result, void *user_data, CONSOLE_CALLBACK cb, void *cbuser)
+{
+	cb(result, cbuser);
+	if(console_arg_num(result))
+		((GAMECLIENT*)user_data)->send_info(false);
+}