mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Add multiple textures for mobs
This commit is contained in:
parent
ef566a5fe1
commit
85bd085ab8
@ -10,7 +10,7 @@ function mobs:register_mob(name, def)
|
||||
visual = def.visual,
|
||||
visual_size = def.visual_size,
|
||||
mesh = def.mesh,
|
||||
textures = def.textures,
|
||||
--textures = def.textures,
|
||||
makes_footstep_sound = def.makes_footstep_sound,
|
||||
view_range = def.view_range,
|
||||
walk_velocity = def.walk_velocity,
|
||||
@ -636,8 +636,10 @@ function mobs:register_mob(name, def)
|
||||
local tmp = {
|
||||
lifetimer = self.lifetimer,
|
||||
tamed = self.tamed,
|
||||
textures = { textures = self.textures },
|
||||
--textures = { textures = self.textures },
|
||||
textures = def.available_textures["texture_"..math.random(1,def.available_textures["total"])],
|
||||
}
|
||||
self.object:set_properties(tmp)
|
||||
return minetest.serialize(tmp)
|
||||
end,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user