summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-01-13 20:11:07 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2018-01-13 20:11:07 +0000
commit331c4e96d24ad1ca05d248b9716df6b653f8c46d (patch)
treeef6831747a75433b2c18cd25ae96252da1369b9d
parent4bf4d42b07940f77f7333d94d3c0fcf93e5e5511 (diff)
fix selectionbox error when var missing
-rw-r--r--api.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index 3c4db20..6ff28c2 100644
--- a/api.lua
+++ b/api.lua
@@ -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