From 30dc0b6798303bfd3c5f78ee955ad128037b82f6 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Tue, 16 Oct 2018 21:46:49 -0400 Subject: [PATCH] pvp refactor --- init.lua | 6 ------ spawnnokill.lua | 26 -------------------------- 2 files changed, 32 deletions(-) delete mode 100644 spawnnokill.lua diff --git a/init.lua b/init.lua index 6c27a73..045b5a3 100644 --- a/init.lua +++ b/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 diff --git a/spawnnokill.lua b/spawnnokill.lua deleted file mode 100644 index db4f51a..0000000 --- a/spawnnokill.lua +++ /dev/null @@ -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)