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

Health warning effect now accounts for negative life

parent 6acb305c
No related branches found
No related tags found
No related merge requests found
......@@ -459,7 +459,7 @@ function _M:updateMainShader()
-- Set shader HP warning
if self.life ~= self.shader_old_life then
if self.life < self.max_life / 2 then game.fbo_shader:setUniform("hp_warning", 1 - (self.life / self.max_life))
if (self.life - self.die_at) < (self.max_life - self.die_at) / 2 then game.fbo_shader:setUniform("hp_warning", 1 - (self.life / (self.max_life - self.die_at)))
else game.fbo_shader:setUniform("hp_warning", 0) end
end
-- Set shader air warning
......
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