]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.c
Merge remote branch 'origin/terencehill/mapvote_fade'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.c
index da6f5f54575714328974ecf92213698836c39fb3..f4a6c5a3e3dc40adbefdaf5d4eb1f7a75b94be4a 100644 (file)
@@ -33,7 +33,7 @@ void KeyBinder_Bind_Edit(entity btn, entity me);
 
 #ifdef IMPLEMENTATION
 
-string KEY_NOT_BOUND_COMMAND "// not bound";
+string KEY_NOT_BOUND_CMD = "// not bound";
 
 #define MAX_KEYS_PER_FUNCTION 2
 #define MAX_KEYBINDS 256
@@ -47,7 +47,7 @@ void Xonotic_KeyBinds_Read()
        string s;
 
        Xonotic_KeyBinds_Count = 0;
-       fh = fopen("keybinds.txt", FILE_READ);
+       fh = fopen(language_filename("keybinds.txt"), FILE_READ);
        if(fh < 0)
                return;
        while((s = fgets(fh)))
@@ -137,6 +137,7 @@ void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
                }
        }
        localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
+       localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
 }
 void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease)
 {
@@ -197,7 +198,7 @@ void KeyBinder_Bind_Clear(entity btn, entity me)
                        //localcmd("\nunbind \"", keynumtostring(k), "\"\n");
                        localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
        }
-
+       localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
 }
 void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where)
 {