Skip to content
Snippets Groups Projects
Commit 0374e45c authored by dg's avatar dg
Browse files

safety

git-svn-id: http://svn.net-core.org/repos/t-engine4@6168 51575b47-30f0-44d4-a5cc-537603b46e54
parent e1ad20e4
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ function _M:init() ...@@ -51,7 +51,7 @@ function _M:init()
engine.interface.GameSound.init(self) engine.interface.GameSound.init(self)
engine.GameEnergyBased.init(self, engine.KeyBind.new(), 100, 100) engine.GameEnergyBased.init(self, engine.KeyBind.new(), 100, 100)
self.profile_font = core.display.newFont("/data/font/DroidSerif-Italic.ttf", 14) self.profile_font = core.display.newFont("/data/font/DroidSerif-Italic.ttf", 14)
self.background = core.display.loadImage("/data/gfx/background/tome.png") self.background = core.display.loadImage("/data/gfx/background/tome3.png")
if self.background then if self.background then
self.background_w, self.background_h = self.background:getSize() self.background_w, self.background_h = self.background:getSize()
self.background, self.background_tw, self.background_th = self.background:glTexture() self.background, self.background_tw, self.background_th = self.background:glTexture()
......
...@@ -350,6 +350,7 @@ end ...@@ -350,6 +350,7 @@ end
function _M:actBase() function _M:actBase()
-- Stupid sanity check that is actualy useful -- Stupid sanity check that is actualy useful
if self.life ~= self.life then self.life = self.max_life end if self.life ~= self.life then self.life = self.max_life end
if self.life_regen ~= self.life_regen then self.life_regen = 1 end
-- Solipsism speed effects; calculated before the actor gets energy -- Solipsism speed effects; calculated before the actor gets energy
local current_psi_percentage = self:getPsi() / self:getMaxPsi() local current_psi_percentage = self:getPsi() / self:getMaxPsi()
......
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