mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
skip damage completely when player & pvp disabled
This commit is contained in:
parent
77d834ac5e
commit
bf23c61e34
3 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
local ok = false
|
local ok = false
|
||||||
if hitpoint.ref:is_player() and enable_pvp then
|
if hitpoint.ref:is_player() and enable_pvp then
|
||||||
ok = true
|
ok = true
|
||||||
elseif hitpoint.ref:get_luaentity() then
|
elseif not hitpoint.ref:is_player() and hitpoint.ref:get_luaentity() then
|
||||||
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -420,7 +420,7 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
local ok = false
|
local ok = false
|
||||||
if hitpoint.ref:is_player() and enable_pvp then
|
if hitpoint.ref:is_player() and enable_pvp then
|
||||||
ok = true
|
ok = true
|
||||||
elseif hitpoint.ref:get_luaentity() then
|
elseif not hitpoint.ref:is_player() and hitpoint.ref:get_luaentity() then
|
||||||
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -220,7 +220,7 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
local ok = false
|
local ok = false
|
||||||
if hitpoint.ref:is_player() and enable_pvp then
|
if hitpoint.ref:is_player() and enable_pvp then
|
||||||
ok = true
|
ok = true
|
||||||
elseif hitpoint.ref:get_luaentity() then
|
elseif not hitpoint.ref:is_player() and hitpoint.ref:get_luaentity() then
|
||||||
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue