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

fix old texture support

This commit is contained in:
TenPlus1 2017-02-02 13:51:51 +00:00
parent 62d00489b3
commit 40e6eaf98a

View File

@ -2217,7 +2217,12 @@ local mob_activate = function(self, staticdata, dtime_s, def)
-- 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
if #def.textures == 1 then
self.base_texture = def.textures
else
self.base_texture = def.textures[random(1, #def.textures)] self.base_texture = def.textures[random(1, #def.textures)]
end
self.base_mesh = def.mesh self.base_mesh = def.mesh
self.base_size = self.visual_size self.base_size = self.visual_size
self.base_colbox = self.collisionbox self.base_colbox = self.collisionbox