[FIX] XGUI showing all commands if the UCL contained an empty string (Thanks, Steven).

This commit is contained in:
Nayruden 2016-03-20 14:52:28 -04:00
parent c3a9fb5914
commit cb809a7881
3 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
## v3.71 - *(00/00/00)*
* [FIX] Reading information from corrupted addons (Thanks, Jindego).
* [FIX] XGUI showing all commands if the UCL contained an empty string (Thanks, Steven).
## v3.70 - *(02/15/16)*
* [ADD] XGUI: Ability to set the 'nextlevel' cvar from the maps tab, if you have access to "ulx map".

View File

@ -298,8 +298,8 @@ cmds.refresh = function( permissionChanged )
local sortcategories = {}
local matchedCmdFound = false
for cmd, data in pairs( ULib.cmds.translatedCmds ) do
local opposite = data.opposite or ""
if opposite ~= cmd and ( LocalPlayer():query( data.cmd ) or LocalPlayer():query( opposite ) ) then
local opposite = data.opposite
if opposite ~= cmd and ( LocalPlayer():query( data.cmd ) or (opposite and LocalPlayer():query( opposite ) )) then
local catname = data.category
if catname == nil or catname == "" then catname = "_Uncategorized" end
if not cmds.cmd_contents[catname] then
@ -391,4 +391,4 @@ end
cmds.refresh()
hook.Add( "UCLChanged", "xgui_RefreshPlayerCmds", cmds.refresh )
hook.Add( "ULibPlayerNameChanged", "xgui_plyUpdateCmds", cmds.playerNameChanged )
xgui.addModule( "Cmds", cmds, "icon16/user_gray.png" )
xgui.addModule( "Cmds", cmds, "icon16/user_gray.png" )

View File

@ -1 +1 @@
1456665586
1458499948