about summary refs log tree commit diff
path: root/src/game/client/menu.cpp
diff options
context:
space:
mode:
authorJakob Fries <jakob.fries@gmail.com>2007-08-14 22:48:49 +0000
committerJakob Fries <jakob.fries@gmail.com>2007-08-14 22:48:49 +0000
commit3a8af93e33c0269d79aec015770840e30937d053 (patch)
treee327b18581bcab43ee38bbe242375fbf612fa86c /src/game/client/menu.cpp
parentacd2b1beb8b17d00f918fd62a4bbc558eadfe52a (diff)
downloadzcatch-3a8af93e33c0269d79aec015770840e30937d053.tar.gz
zcatch-3a8af93e33c0269d79aec015770840e30937d053.zip
emoticons version 1
Diffstat (limited to 'src/game/client/menu.cpp')
-rw-r--r--src/game/client/menu.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/client/menu.cpp b/src/game/client/menu.cpp
index b5cbc1b6..b2a4fbb8 100644
--- a/src/game/client/menu.cpp
+++ b/src/game/client/menu.cpp
@@ -974,6 +974,7 @@ static int settings_sound_render()
 }
 
 extern void draw_round_rect(float x, float y, float w, float h, float r);
+void send_changename_request(const char *name);
 
 static int settings_render(bool ingame)
 {
@@ -1013,6 +1014,10 @@ static int settings_render(bool ingame)
 	static int save_button;
 	if (ui_do_button(&save_button, "Save", 0, 482, 490, 128, 48, draw_teewars_button))
 	{
+		// did we change our name?
+		if (ingame && strcmp(config.player_name, config_copy.player_name) != 0)
+			send_changename_request(config_copy.player_name);
+
 		config = config_copy;
 #ifdef CONF_PLATFORM_MACOSX
 		config_save("~/.teewars");