about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 22:46:58 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 22:46:58 +0000
commite76e0e6f7e82c267ea657bf72db6b8a40a0a82a6 (patch)
treed07b0eef00e216e98b9ec76a77bec38a33ba4685 /src
parenta8fb732b0eeca49faf76a49846bf607331aaab2d (diff)
downloadzcatch-e76e0e6f7e82c267ea657bf72db6b8a40a0a82a6.tar.gz
zcatch-e76e0e6f7e82c267ea657bf72db6b8a40a0a82a6.zip
fixed so that the gui removes previous key binding if you change it
Diffstat (limited to 'src')
-rw-r--r--src/game/client/components/menus_settings.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp
index e2059f46..3db02aa4 100644
--- a/src/game/client/components/menus_settings.cpp
+++ b/src/game/client/components/menus_settings.cpp
@@ -265,12 +265,15 @@ void MENUS::ui_do_getbuttons(int start, int stop, RECT view)
 void MENUS::render_settings_controls(RECT main_view)
 {
 	// this is kinda slow, but whatever
+	for(int i = 0; i < key_count; i++)
+		keys[i].keyid = 0;
+	
 	for(int keyid = 0; keyid < KEY_LAST; keyid++)
 	{
 		const char *bind = gameclient.binds->get(keyid);
 		if(!bind[0])
 			continue;
-			
+		
 		for(int i = 0; i < key_count; i++)
 			if(strcmp(bind, keys[i].command) == 0)
 			{