Removed some useless stuff

This commit is contained in:
Latapostrophe 2018-10-30 23:08:58 +01:00
parent 232a19edf4
commit b6b19c8250

View file

@ -574,7 +574,7 @@ static int libd_renderer(lua_State *L)
return 1; return 1;
} }
// Lat': Get cv_translucenthud's value for HUD rendering as a normal V_xxTRANS int // Lat': Get cv_translucenthud's value for HUD rendering as a normal V_xxTRANS int instead of V_HUDTRANS. This is useful if we want to work from that transparency value
// Could as well be thrown in global vars for ease of access but I guess it makes sense for it to be a HUD fn // Could as well be thrown in global vars for ease of access but I guess it makes sense for it to be a HUD fn
static int libd_getlocaltransflag(lua_State *L) static int libd_getlocaltransflag(lua_State *L)
{ {
@ -625,11 +625,10 @@ static int lib_huddisable(lua_State *L)
} }
// 30/10/18: Lat': Why the FUCK is this NOT in vanilla // 30/10/18: Lat': Why the FUCK is this NOT in vanilla
static int LUA_IsHUDEnabled(lua_State *L) static int lib_hudenabled(lua_State *L)
{ {
enum hud option = luaL_checkoption(L, 1, NULL, hud_disable_options); enum hud option = luaL_checkoption(L, 1, NULL, hud_disable_options);
lua_settop(L, 2); if (hud_enabled[option/8] & (1<<(option%8)))
if (!gL || hud_enabled[option/8] & (1<<(option%8)))
lua_pushboolean(L, true); lua_pushboolean(L, true);
else else
lua_pushboolean(L, false); lua_pushboolean(L, false);
@ -661,7 +660,7 @@ static int lib_hudadd(lua_State *L)
static luaL_Reg lib_hud[] = { static luaL_Reg lib_hud[] = {
{"enable", lib_hudenable}, {"enable", lib_hudenable},
{"disable", lib_huddisable}, {"disable", lib_huddisable},
{"enabled", LUA_IsHUDEnabled}, {"enabled", LUA_hudenabled},
{"add", lib_hudadd}, {"add", lib_hudadd},
{NULL, NULL} {NULL, NULL}
}; };