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

prevent nasty addons from crashing. bad addons. bad!

parent e6a997ea
No related branches found
No related tags found
No related merge requests found
......@@ -434,23 +434,25 @@ function _M:updateMainShader()
end
-- Blur shader
if config.settings.tome.fullscreen_confusion then
if config.settings.tome.fullscreen_confusion and pf.blur and pf.blur.shad then
if self:attr("confused") and self.confused >= 1 then pf.blur.shad:uniBlur(2) effects[pf.blur.shad] = true
end
end
-- Moving Blur shader
if self:attr("invisible") then pf.motionblur.shad:uniMotionblur(3) effects[pf.motionblur.shad] = true
elseif self:attr("lightning_speed") then pf.motionblur.shad:uniMotionblur(2) effects[pf.motionblur.shad] = true
elseif game.level and game.level.data and game.level.data.motionblur then pf.motionblur.shad:uniMotionblur(game.level.data.motionblur) effects[pf.motionblur.shad] = true
if pf.motionblur and pf.motionblur.shad then
if self:attr("invisible") then pf.motionblur.shad:uniMotionblur(3) effects[pf.motionblur.shad] = true
elseif self:attr("lightning_speed") then pf.motionblur.shad:uniMotionblur(2) effects[pf.motionblur.shad] = true
elseif game.level and game.level.data and game.level.data.motionblur then pf.motionblur.shad:uniMotionblur(game.level.data.motionblur) effects[pf.motionblur.shad] = true
end
end
-- Underwater shader
if game.level and game.level.data and game.level.data.underwater then effects[pf.underwater.shad] = true
if game.level and game.level.data and game.level.data.underwater and pf.underwater and pf.underwater.shad then effects[pf.underwater.shad] = true
end
-- Wobbling shader
if config.settings.tome.fullscreen_stun then
if config.settings.tome.fullscreen_stun and pf.wobbling and pf.wobbling.shad then
if self:attr("stunned") and self.stunned >= 1 then pf.wobbling.shad:uniWobbling(1) effects[pf.wobbling.shad] = true
elseif self:attr("dazed") and self.dazed >= 1 then pf.wobbling.shad:uniWobbling(0.7) effects[pf.wobbling.shad] = true
end
......
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