mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-21 15:21:24 +00:00
cleaner
This commit is contained in:
parent
b42bfa02b9
commit
40f842d9f3
1 changed files with 4 additions and 8 deletions
12
mob_meta.lua
12
mob_meta.lua
|
@ -877,14 +877,10 @@ function mob:on_step(dtime, moveresult)
|
||||||
self:memorize("active_time", self.active_time)
|
self:memorize("active_time", self.active_time)
|
||||||
if self.despawn_after then
|
if self.despawn_after then
|
||||||
local despawn = math.floor(self.active_time / self.despawn_after)
|
local despawn = math.floor(self.active_time / self.despawn_after)
|
||||||
if despawn > 0 then
|
if despawn > 1 then self.object:remove() return end
|
||||||
if despawn > 1 then
|
if despawn > 0
|
||||||
self.object:remove()
|
and not self._despawn then
|
||||||
return
|
self._despawn = self:memorize("_despawn", true)
|
||||||
end
|
|
||||||
if not self._despawn then
|
|
||||||
self._despawn = self:memorize("_despawn", true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue