forked from MineClone5/MineClone5
Merge pull request 'Fix boat initialization failure' (#298) from c29979/MineClone5:fix-boat-init-failure into master
Reviewed-on: MineClone5/MineClone5#298
This commit is contained in:
commit
d476e26c60
|
@ -166,6 +166,7 @@ function boat.on_activate(self, staticdata, dtime_s)
|
||||||
self._last_v = self._v
|
self._last_v = self._v
|
||||||
self._itemstring = data.itemstring
|
self._itemstring = data.itemstring
|
||||||
|
|
||||||
|
if data.textures then
|
||||||
while #data.textures < 5 do
|
while #data.textures < 5 do
|
||||||
table.insert(data.textures, data.textures[1])
|
table.insert(data.textures, data.textures[1])
|
||||||
end
|
end
|
||||||
|
@ -173,6 +174,7 @@ function boat.on_activate(self, staticdata, dtime_s)
|
||||||
self.object:set_properties({textures = data.textures})
|
self.object:set_properties({textures = data.textures})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function boat.get_staticdata(self)
|
function boat.get_staticdata(self)
|
||||||
if not self then return end
|
if not self then return end
|
||||||
|
|
Loading…
Reference in New Issue