Nullify velocity and acceleration if player is below y < 50
This commit is contained in:
parent
3099dd6228
commit
a7403d6600
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user