forked from VoxeLibre/VoxeLibre
entity cramming: check less often
This commit is contained in:
parent
9a02a0e596
commit
991cffbaf7
|
@ -3024,10 +3024,9 @@ local function check_entity_cramming(self)
|
|||
local l = o:get_luaentity()
|
||||
if l and clear then
|
||||
l.cram = nil
|
||||
ncram = {}
|
||||
elseif l and l.cram == nil then
|
||||
table.insert(ncram,l)
|
||||
elseif l and l.cram then
|
||||
elseif not clear and l and l.cram then
|
||||
damage_mob(l,"cramming",cramming_damage)
|
||||
end
|
||||
end
|
||||
|
@ -3632,7 +3631,6 @@ end
|
|||
-- main mob function
|
||||
local mob_step = function(self, dtime)
|
||||
check_item_pickup(self)
|
||||
check_entity_cramming(self)
|
||||
if not self.fire_resistant then
|
||||
mcl_burning.tick(self.object, dtime, self)
|
||||
end
|
||||
|
@ -3750,7 +3748,7 @@ local mob_step = function(self, dtime)
|
|||
|
||||
if (self.state == "attack" and self.env_damage_timer > 1)
|
||||
or self.state ~= "attack" then
|
||||
|
||||
check_entity_cramming(self)
|
||||
self.env_damage_timer = 0
|
||||
|
||||
-- check for environmental damage (water, fire, lava etc.)
|
||||
|
|
Loading…
Reference in New Issue