mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 12:23:44 +01:00
Merge pull request 'Fix tropical fish crash (#2583)' (#2587) from fix_tropical_fish_textures into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2587 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
35f064511d
@ -3467,7 +3467,10 @@ local mob_activate = function(self, staticdata, def, dtime)
|
|||||||
def.textures = {def.textures}
|
def.textures = {def.textures}
|
||||||
end
|
end
|
||||||
|
|
||||||
self.base_texture = def.textures[random(1, #def.textures)]
|
local c = 1
|
||||||
|
if #def.textures > c then c = #def.textures end
|
||||||
|
|
||||||
|
self.base_texture = def.textures[math.random(c)]
|
||||||
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
|
||||||
|
@ -72,7 +72,7 @@ local tropical_fish = {
|
|||||||
collisionbox = {-0.2, 0.0, -0.2, 0.2, 0.1, 0.2},
|
collisionbox = {-0.2, 0.0, -0.2, 0.2, 0.1, 0.2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_tropical_fish_a.b3d",
|
mesh = "extra_mobs_tropical_fish_a.b3d",
|
||||||
textures = {}, -- to be populated on_spawn
|
textures = { "extra_mobs_tropical_fish_a.png" }, -- to be populated on_spawn
|
||||||
sounds = {},
|
sounds = {},
|
||||||
animation = {
|
animation = {
|
||||||
stand_start = 0,
|
stand_start = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user