Skip to content
Snippets Groups Projects
Commit 44e86438 authored by DarkGod's avatar DarkGod
Browse files

Fixed the UI sometimes being affected by invisibility shader or suchlike

parent c0749cea
No related branches found
No related tags found
No related merge requests found
......@@ -1573,6 +1573,8 @@ function _M:setupCommands()
print("===============")
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
game.log("lol")
do return end
local f, err = loadfile("/data/general/events/fearscape-portal.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
......
......@@ -272,7 +272,7 @@ function _M:innerDisplay(x, y, nb_keyframes, tx, ty)
if self.shadow then item._tex:toScreenFull(x+2, h+2, item.w, item.h, item._tex_w, item._tex_h, 0,0,0, self.shadow) end
item._tex:toScreenFull(x, h, item.w, item.h, item._tex_w, item._tex_h)
for di = 1, #item._dduids do item._dduids[di].e:toScreen(nil, x + item._dduids[di].x, h, item._dduids[di].w, item._dduids[di].w, 1) end
for di = 1, #item._dduids do item._dduids[di].e:toScreen(nil, x + item._dduids[di].x, h, item._dduids[di].w, item._dduids[di].w, 1, false, false) end
self.dlist[i].dh = h - y
-- print("<<",i,"::",h + ty)
......
......@@ -431,7 +431,7 @@ static int map_objects_toscreen(lua_State *L)
float dh = h * dm->dh;
int dz = moid;
if (m != dm && dm->shader) {
if (m != dm && allow_shader && dm->shader) {
for (z = dm->nb_textures - 1; z > 0; z--)
{
if (multitexture_active) tglActiveTexture(GL_TEXTURE0+z);
......@@ -456,7 +456,7 @@ static int map_objects_toscreen(lua_State *L)
glDrawArrays(GL_QUADS, 0, 4);
if (m != dm) {
if (m->shader) useShader(m->shader, 0, 0, w, h, 1, 1, 1, a);
if (allow_shader && m->shader) useShader(m->shader, 0, 0, w, h, 1, 1, 1, a);
else tglUseProgramObject(0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment