]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.qc
Remove redundant brackets from MACRO_BEGIN / MACRO_END calls
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.qc
index 1f28a1bdfede23aa181f110ca297596457a85976..8c0468ea0d639733ad06ed5e56412a702968c546 100644 (file)
@@ -18,13 +18,13 @@ void Xonotic_KeyBinds_Read()
 {
        Xonotic_KeyBinds_Count = 0;
 
-       #define KEYBIND_DEF(func, desc) MACRO_BEGIN \
+       #define KEYBIND_DEF(func, desc) MACRO_BEGIN \
                if((Xonotic_KeyBinds_Count < MAX_KEYBINDS)) { \
                        Xonotic_KeyBinds_Functions[Xonotic_KeyBinds_Count] = strzone(func); \
                        Xonotic_KeyBinds_Descriptions[Xonotic_KeyBinds_Count] = strzone(desc); \
                        ++Xonotic_KeyBinds_Count; \
                } \
-       MACRO_END
+       MACRO_END
 
        KEYBIND_DEF(""                                      , _("Moving"));
        KEYBIND_DEF("+forward"                              , _("forward"));
@@ -34,7 +34,7 @@ void Xonotic_KeyBinds_Read()
        KEYBIND_DEF("+jump"                                 , _("jump / swim"));
        KEYBIND_DEF("+crouch"                               , _("crouch / sink"));
        KEYBIND_DEF("+hook"                                 , _("off-hand hook"));
-       KEYBIND_DEF("+jetpack"                              , _("jet pack"));
+       KEYBIND_DEF("+jetpack"                              , _("jetpack"));
        KEYBIND_DEF(""                                      , "");
        KEYBIND_DEF(""                                      , _("Attacking"));
        KEYBIND_DEF("+fire"                                 , _("primary fire"));
@@ -103,6 +103,7 @@ void Xonotic_KeyBinds_Read()
        KEYBIND_DEF("+use"                                  , _("drop key / drop flag"));
        KEYBIND_DEF(""                                      , "");
        KEYBIND_DEF(""                                      , _("Misc"));
+       KEYBIND_DEF("kill"                                  , _("respawn"));
        KEYBIND_DEF("quickmenu"                             , _("quick menu"));
        KEYBIND_DEF("menu_showsandboxtools"                 , _("sandbox menu"));
        KEYBIND_DEF("+button8"                              , _("drag object"));
@@ -246,12 +247,8 @@ void XonoticKeyBinder_destroy(entity me)
 
        for(int i = 0; i < MAX_KEYBINDS; ++i)
        {
-               if(Xonotic_KeyBinds_Functions[i])
-                       strunzone(Xonotic_KeyBinds_Functions[i]);
-               Xonotic_KeyBinds_Functions[i] = string_null;
-               if(Xonotic_KeyBinds_Descriptions[i])
-                       strunzone(Xonotic_KeyBinds_Descriptions[i]);
-               Xonotic_KeyBinds_Descriptions[i] = string_null;
+               strfree(Xonotic_KeyBinds_Functions[i]);
+               strfree(Xonotic_KeyBinds_Descriptions[i]);
        }
        Xonotic_KeyBinds_Count = 0;
 }