forked from VoxeLibre/VoxeLibre
Attempt 3: Changed the way that the cat.on_spawn picks a texture from the list.
This commit is contained in:
parent
0f77909868
commit
5f4a0d837b
|
@ -162,8 +162,8 @@ cat.on_spawn = function(self)
|
||||||
self._texture = {"mobs_mc_cat_black.png"}
|
self._texture = {"mobs_mc_cat_black.png"}
|
||||||
end
|
end
|
||||||
if not self._texture then
|
if not self._texture then
|
||||||
local max_tex = 3 -- hard coded because table.maxn() failed.
|
local max_tex = 3
|
||||||
self._texture = cat.textures[pr.next(1,max_tex)] -- pick a random texture.
|
self._texture = cat.textures[pr:next(1,max_tex)] -- pick a random texture.
|
||||||
end
|
end
|
||||||
self.object:set_properties({textures = {self._texture}})
|
self.object:set_properties({textures = {self._texture}})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue