mirror of
https://codeberg.org/SumianVoice/sum_airship.git
synced 2025-03-21 23:22:22 +00:00
actually fix instancing issue
This commit is contained in:
parent
4aa98185f8
commit
49c53b06a7
1 changed files with 14 additions and 15 deletions
29
init.lua
29
init.lua
|
@ -308,6 +308,20 @@ function boat.on_activate(self, staticdata, dtime_s)
|
||||||
|
|
||||||
self.object:set_properties({textures = data.textures})
|
self.object:set_properties({textures = data.textures})
|
||||||
end
|
end
|
||||||
|
self._sounds = { -- workaround for copy vs reference issue
|
||||||
|
engine = {
|
||||||
|
handle = nil,
|
||||||
|
gain = 0.1,
|
||||||
|
playing = false,
|
||||||
|
time_elapsed = 0,
|
||||||
|
},
|
||||||
|
engine_stop = {
|
||||||
|
handle = nil,
|
||||||
|
gain = 0.1,
|
||||||
|
playing = false,
|
||||||
|
time_elapsed = 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function boat.get_staticdata(self)
|
function boat.get_staticdata(self)
|
||||||
|
@ -606,21 +620,6 @@ for b=1, #boat_ids do
|
||||||
end
|
end
|
||||||
local boat = minetest.add_entity(pos, "sum_airship:boat")
|
local boat = minetest.add_entity(pos, "sum_airship:boat")
|
||||||
local texture = "sum_airship_texture_"..images[b].."_boat.png"
|
local texture = "sum_airship_texture_"..images[b].."_boat.png"
|
||||||
local luaent = boat:get_luaentity()
|
|
||||||
luaent._sounds = { -- workaround for copy vs reference issue
|
|
||||||
engine = {
|
|
||||||
handle = nil,
|
|
||||||
gain = 0.1,
|
|
||||||
playing = false,
|
|
||||||
time_elapsed = 0,
|
|
||||||
},
|
|
||||||
engine_stop = {
|
|
||||||
handle = nil,
|
|
||||||
gain = 0.1,
|
|
||||||
playing = false,
|
|
||||||
time_elapsed = 0,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
boat:get_luaentity()._itemstring = itemstring
|
boat:get_luaentity()._itemstring = itemstring
|
||||||
boat:set_properties({textures = { texture, texture, texture, texture, texture }})
|
boat:set_properties({textures = { texture, texture, texture, texture, texture }})
|
||||||
boat:set_yaw(placer:get_look_horizontal())
|
boat:set_yaw(placer:get_look_horizontal())
|
||||||
|
|
Loading…
Add table
Reference in a new issue