mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-11-09 17:03:58 +01:00
Handle nil return value for add_item
Remove old comments. Current HEAD requires version ~0.4.16
This commit is contained in:
parent
6492b8ec76
commit
6fdda18390
@ -350,8 +350,10 @@ luaentity.register_entity("pipeworks:tubed_item", {
|
||||
-- compatible with Minetest 0.4.13.
|
||||
-- Using item_drop here makes Minetest 0.4.13 crash.
|
||||
local dropped_item = minetest.add_item(self.start_pos, stack)
|
||||
if dropped_item then
|
||||
dropped_item:set_velocity(vector.multiply(velocity, 5))
|
||||
self:remove()
|
||||
end
|
||||
return
|
||||
else
|
||||
velocity = vector.multiply(velocity, -1)
|
||||
|
Loading…
Reference in New Issue
Block a user