mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Add PVP check for rocket arrows
This commit is contained in:
parent
454d7e8b04
commit
b7f8a75d04
1 changed files with 2 additions and 1 deletions
|
@ -231,6 +231,7 @@ end
|
|||
local mod_awards = minetest.get_modpath("awards") and minetest.get_modpath("mcl_achievements")
|
||||
local mod_button = minetest.get_modpath("mesecons_button")
|
||||
local mod_target = minetest.get_modpath("mcl_target")
|
||||
local enable_pvp = minetest.settings:get_bool("enable_pvp")
|
||||
|
||||
minetest.register_craftitem("mcl_bows:rocket", {
|
||||
description = S("Arrow"),
|
||||
|
@ -417,7 +418,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
|
||||
|
|
Loading…
Reference in a new issue