mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 05:51:05 +01:00
Add nil check to prevent crashes with mcl_throwing
This commit is contained in:
parent
ff538d51bd
commit
598692cf8c
1 changed files with 2 additions and 2 deletions
|
@ -203,7 +203,7 @@ local pearl_on_step = function(self, dtime)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
-- Activate when hitting a solid node or a plant
|
-- Activate when hitting a solid node or a plant
|
||||||
elseif walkable or nn == "mcl_core:vine" or nn == "mcl_core:deadbush" or minetest.get_item_group(nn, "flower") ~= 0 or minetest.get_item_group(nn, "sapling") ~= 0 or minetest.get_item_group(nn, "plant") ~= 0 or minetest.get_item_group(nn, "mushroom") ~= 0 or not def then
|
elseif walkable or nn == "mcl_core:vine" or nn == "mcl_core:deadbush" or minetest.get_item_group(nn, "flower") ~= 0 or minetest.get_item_group(nn, "sapling") ~= 0 or minetest.get_item_group(nn, "plant") ~= 0 or minetest.get_item_group(nn, "mushroom") ~= 0 or not def then
|
||||||
local player = minetest.get_player_by_name(self._thrower)
|
local player = self._thrower and 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