1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-24 17:50:21 +01:00

fix selectionbox error when var missing

This commit is contained in:
TenPlus1 2018-01-13 20:11:07 +00:00
parent 4bf4d42b07
commit 331c4e96d2

View File

@ -3,7 +3,7 @@
mobs = {}
mobs.mod = "redo"
mobs.version = "20180112"
mobs.version = "20180113"
-- Intllib
@ -2366,6 +2366,8 @@ local mob_staticdata = function(self)
-- remove mob when out of range unless tamed
if remove_far
and self.remove_ok
and self.type ~= "npc"
and self.state ~= "attack"
and not self.tamed
and self.lifetimer < 20000 then
@ -2446,6 +2448,11 @@ local mob_activate = function(self, staticdata, def, dtime)
self.base_selbox = self.selectionbox
end
-- for current mobs that dont have this set
if not self.base_selbox then
self.base_selbox = self.selectionbox or self.base_colbox
end
-- set texture, model and size
local textures = self.base_texture
local mesh = self.base_mesh