From a7403d660043c94e5d8543e49227264164a72bd7 Mon Sep 17 00:00:00 2001 From: ANAND Date: Sun, 6 Oct 2019 10:15:41 +0000 Subject: [PATCH] Nullify velocity and acceleration if player is below y < 50 --- mods/player/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/player/init.lua b/mods/player/init.lua index 3c26b7d..a9d4625 100644 --- a/mods/player/init.lua +++ b/mods/player/init.lua @@ -110,6 +110,8 @@ local function player_health_adjust() local hp = player:get_hp() if player:getpos().y < -50 and hp > 0 then player:set_hp(hp - 100) + player:set_velocity({x = 0, y = 0, z = 0}) + player:set_acceleration({x = 0, y = 0, z = 0}) else local breath = player:get_breath() if hp > 0 and hp < 20 and breath > 0 then