From 760716d2e908a2ba108d0efa4c95797da589406a Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 25 Dec 2012 20:12:35 +0000 Subject: [PATCH] fix git-svn-id: http://svn.net-core.org/repos/t-engine4@6226 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Player.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 3494cc6c37..c444a1240d 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -75,6 +75,7 @@ function _M:init(t, no_default) t.lite = t.lite or 0 t.rank = t.rank or 3 + t.shader_old_life = 0 t.old_air = 0 t.old_psi = 0 @@ -296,6 +297,7 @@ function _M:act() -- Funky shader things ! self:updateMainShader() + self.shader_old_life = self.life self.old_air = self.air self.old_psi = self.psi @@ -332,7 +334,7 @@ end function _M:updateMainShader() if game.fbo_shader then -- Set shader HP warning - if self.life ~= self.old_life then + 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)) else game.fbo_shader:setUniform("hp_warning", 0) end end -- GitLab