diff options
author | Joachim Stolberg <joe.stolberg@gmx.de> | 2017-09-09 21:55:17 +0200 |
---|---|---|
committer | Joachim Stolberg <joe.stolberg@gmx.de> | 2017-09-09 21:55:17 +0200 |
commit | 01e08cbb30085800c600c4501a3763b053dea85a (patch) | |
tree | b2f52c696f3a8f3dc1589e45574fb9cab373f650 | |
parent | 4a9ea3272cd8d73c26e6bc1ba5be921a7972c049 (diff) |
player bugfixorigin/Hook-Entity
-rw-r--r-- | init.lua | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,7 +3,7 @@ Tower Crane Mod =============== - v0.10 by JoSt + v0.11 by JoSt Copyright (C) 2017 Joachim Stolberg LGPLv2.1+ @@ -20,6 +20,7 @@ 2017-07-16 v0.08 player times out bugfix 2017-08-19 v0.09 crane protection area to prevent crane clusters 2017-08-27 v0.10 hook instance and sound switch off bug fixes + 2017-09-09 v0.11 further player bugfixes ]]-- @@ -346,12 +347,14 @@ local function remove_hook(player, pos, y_offs) pos = table.copy(pos) pos.y = pos.y + y_offs local key = minetest.hash_node_position(pos) - default.player_set_animation(player, "stand" , 10) + if player ~= nil then + default.player_set_animation(player, "stand" , 10) + end local hook = towercrane.hook[key] if hook then -- remove hook hook:remove() - if hook:get_luaentity().sound ~= nil then + if hook and hook:get_luaentity() and hook:get_luaentity().sound ~= nil then -- stop sound minetest.sound_stop(hook:get_luaentity().sound) end |