about summary refs log tree commit diff
path: root/src/game/client/gc_hooks.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-10 19:36:05 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-10 19:36:05 +0000
commite7241d743cbd73b2950ce73daba35491a47735ea (patch)
treeb479fdb0380557909f791052fb094ad336318610 /src/game/client/gc_hooks.cpp
parent3f3e1715114c8f1af1b4128afac0b0699870ae68 (diff)
downloadzcatch-e7241d743cbd73b2950ce73daba35491a47735ea.tar.gz
zcatch-e7241d743cbd73b2950ce73daba35491a47735ea.zip
fixed the ninja rendering
Diffstat (limited to 'src/game/client/gc_hooks.cpp')
-rw-r--r--src/game/client/gc_hooks.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp
index e1644f36..7d2e1546 100644
--- a/src/game/client/gc_hooks.cpp
+++ b/src/game/client/gc_hooks.cpp
@@ -506,8 +506,12 @@ extern "C" void modc_message(int msg)
 		if(msg_unpack_error() || cid < 0 || cid >= MAX_CLIENTS)
 			return;
 		
-		strncpy(client_datas[cid].name, name, 64);
-		strncpy(client_datas[cid].skin_name, skinname, 64);
+		str_copy(client_datas[cid].name, name, 64);
+		str_copy(client_datas[cid].skin_name, skinname, 64);
+		
+		// make sure that we don't set a special skin on the client
+		if(client_datas[cid].skin_name[0] == 'x' || client_datas[cid].skin_name[1] == '_')
+			str_copy(client_datas[cid].skin_name, "default", 64);
 		
 		int use_custom_color = msg_unpack_int();
 		client_datas[cid].skin_info.color_body = skin_get_color(msg_unpack_int());