pvp refactor
parent
99c3e57f02
commit
30dc0b6798
6
init.lua
6
init.lua
|
@ -69,12 +69,6 @@ if TP_REQUEST then
|
|||
print("[Mod][enhancements] TP_REQUEST enabled")
|
||||
end
|
||||
|
||||
if SPAWNNOKILL then
|
||||
dofile(minetest.get_modpath("enhancements").."/spawnnokill.lua")
|
||||
|
||||
print("[Mod][enhancements] SPAWNNOKILL enabled")
|
||||
end
|
||||
|
||||
-- manage privileges i areas mod - if using areas mod only for admin purposes
|
||||
-- WIP DON'T ENABLE!
|
||||
if AREAS_ENHANCE and minetest.get_modpath("areas") then
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
--- Heal player when punched around the spawn area - eliminate spawn killing / killers
|
||||
-- @author SaKeL
|
||||
|
||||
local spawn_spawnpos = minetest.setting_get_pos("static_spawnpoint")
|
||||
|
||||
function defaultx.register_on_punchplayer(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
|
||||
if not player or not hitter then
|
||||
return
|
||||
end
|
||||
if not player:is_player() or not hitter:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- local hp = player:get_hp()
|
||||
-- print("get hp: ", hp)
|
||||
|
||||
if spawn_spawnpos then
|
||||
if vector.distance(player:get_pos(), spawn_spawnpos) < 48 then
|
||||
-- print("set hp: ", hp)
|
||||
-- player:set_hp(hp)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_punchplayer(defaultx.register_on_punchplayer)
|
Loading…
Reference in New Issue