From c44e66f45a8864203425710c15410c1f6498341c Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Thu, 5 May 2011 16:28:23 +0000 Subject: [PATCH] Negative HP creatures should correctly die git-svn-id: http://svn.net-core.org/repos/t-engine4@3311 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/engines/default/engine/interface/ActorFOV.lua | 2 +- game/modules/tome/class/Actor.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/engines/default/engine/interface/ActorFOV.lua b/game/engines/default/engine/interface/ActorFOV.lua index b7ced6e97f..85aac2399c 100644 --- a/game/engines/default/engine/interface/ActorFOV.lua +++ b/game/engines/default/engine/interface/ActorFOV.lua @@ -47,7 +47,7 @@ end -- @param cache if true it will use the cache given by the map, for the map actor. It can be used for other actors is they have the same block settings function _M:computeFOV(radius, block, apply, force, no_store, cache) -- If we did not move, do not update - if not force and self.fov_last_x == self.x and self.fov_last_y == self.y and self.fov_computed then return end + if not self.x or not self.y or (not force and self.fov_last_x == self.x and self.fov_last_y == self.y and self.fov_computed) then return end radius = radius or 20 block = block or "block_sight" diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index ba5753fcfc..1c0a0a7e62 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1231,7 +1231,7 @@ function _M:resolveSource() end function _M:die(src) - if self.dead then return true end + if self.dead then self:disappear(src) return true end engine.interface.ActorLife.die(self, src) -- GitLab