From 9215ad066b22522311126067df030e0a1af4f017 Mon Sep 17 00:00:00 2001 From: GNU Hacker Date: Wed, 29 Jun 2022 20:44:21 +0200 Subject: [PATCH] arrow check if pvp is enable --- mods/ITEMS/mcl_bows/arrow.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 8edf75011..a2ba96f36 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -1,6 +1,7 @@ local S = minetest.get_translator(minetest.get_current_modname()) local mod_target = minetest.get_modpath("mcl_target") +local enable_pvp = minetest.settings:get_bool("enable_pvp") local math = math local vector = vector @@ -204,7 +205,7 @@ function ARROW_ENTITY.on_step(self, dtime) if hitpoint.type == "object" then -- find the closest object that is in the way of the arrow local ok = false - if hitpoint.ref:is_player() then + if hitpoint.ref:is_player() and enable_pvp then ok = true elseif hitpoint.ref:get_luaentity() then if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then