mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 11:33:00 +00:00
No teleport when ender pearl hits ignore
This commit is contained in:
parent
447489f7a9
commit
937e1f6999
1 changed files with 5 additions and 1 deletions
|
@ -168,7 +168,11 @@ local pearl_on_step = function(self, dtime)
|
||||||
|
|
||||||
-- Destroy when hitting a solid node
|
-- Destroy when hitting a solid node
|
||||||
if self._lastpos.x~=nil then
|
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)
|
local player = minetest.get_player_by_name(self._thrower)
|
||||||
if player then
|
if player then
|
||||||
-- Teleport and hurt player
|
-- Teleport and hurt player
|
||||||
|
|
Loading…
Reference in a new issue