diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index e52313cea..7d9cd67ec 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -451,7 +451,7 @@ static int lib_cvRegisterVar(lua_State *L) if (cvar->flags & CV_MODIFIED) return luaL_error(L, "failed to register cvar (probable conflict with internal variable/command names)"); - if (!(((cvar->flags & CV_HIDEN)) || (cvar->flags & CV_NOSHOWHELP))) + if (!(((cvar->flags & CV_HIDEN)) || (cvar->flags & CV_NOSHOWHELP)) && (cvar->PossibleValue || !(cvar->value == 0 && stricmp(cvar->string, "0")))) { if (!category) { @@ -637,4 +637,4 @@ int LUA_ConsoleLib(lua_State *L) lua_pushvalue(L, LUA_GLOBALSINDEX); luaL_register(L, NULL, lib); return 0; -} \ No newline at end of file +}