1
0
Fork 0

No teleport when ender pearl hits ignore

This commit is contained in:
Wuzzy 2017-05-26 16:13:51 +02:00
parent 447489f7a9
commit 937e1f6999
1 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,11 @@ local pearl_on_step = function(self, dtime)
-- Destroy when hitting a solid node
if self._lastpos.x~=nil then
if (def and def.walkable) or not def then
-- No teleport for hitting ignore for now. Otherwise the player could get stuck.
-- FIXME: This also means the player loses an ender pearl for throwing into unloaded areas
if node.name == "ignore" then
self.object:remove()
elseif (def and def.walkable) or not def then
local player = minetest.get_player_by_name(self._thrower)
if player then
-- Teleport and hurt player