mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
fix bug mobs collisionbox
indent code 0.4.12-stable version serialize is buggy
This commit is contained in:
parent
d8477debc4
commit
0b6747966f
@ -1058,12 +1058,12 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- select random texture, set model and size
|
-- select random texture, set model and size
|
||||||
if not self.base_texture then
|
--if not self.base_texture then
|
||||||
self.base_texture = def.textures[math.random(1, #def.textures)]
|
self.base_texture = def.textures[math.random(1, #def.textures)]
|
||||||
self.base_mesh = def.mesh
|
self.base_mesh = def.mesh
|
||||||
self.base_size = self.visual_size
|
self.base_size = def.visual_size
|
||||||
self.base_colbox = self.collisionbox
|
self.base_colbox = def.collisionbox
|
||||||
end
|
--end
|
||||||
|
|
||||||
-- set texture, model and size
|
-- set texture, model and size
|
||||||
local textures = self.base_texture
|
local textures = self.base_texture
|
||||||
@ -1125,14 +1125,14 @@ end
|
|||||||
|
|
||||||
get_staticdata = function(self)
|
get_staticdata = function(self)
|
||||||
|
|
||||||
-- remove mob when out of range unless tamed
|
-- remove mob when out of range unless tamed
|
||||||
if mobs.remove and self.remove_ok and not self.tamed then
|
if mobs.remove and self.remove_ok and not self.tamed then
|
||||||
print ("REMOVED", self.remove_ok, self.name)
|
print ("REMOVED", self.remove_ok, self.name)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
self.remove_ok = true
|
self.remove_ok = true
|
||||||
self.attack = nil
|
self.attack = nil
|
||||||
self.following = nil
|
self.following = nil
|
||||||
|
|
||||||
local tmp = {}
|
local tmp = {}
|
||||||
for _,stat in pairs(self) do
|
for _,stat in pairs(self) do
|
||||||
|
Loading…
Reference in New Issue
Block a user