forked from minetest/minetest_game
Fix crash in boats mod
This commit is contained in:
parent
7e5dc6c374
commit
46b6cee1fc
|
@ -76,6 +76,7 @@ function boat:get_staticdata()
|
|||
end
|
||||
|
||||
function boat:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||
puncher:set_detach()
|
||||
self.object:remove()
|
||||
if puncher and puncher:is_player() and not minetest.setting_getbool("creative_mode") then
|
||||
puncher:get_inventory():add_item("main", "boats:boat")
|
||||
|
|
Loading…
Reference in New Issue
Block a user