Handle player void handling in playerplus
This commit is contained in:
parent
0b375f00cd
commit
0f2787cd16
3 changed files with 21 additions and 30 deletions
|
@ -115,6 +115,20 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
end
|
||||
|
||||
-- Apply black sky in the Void and deal Void damage
|
||||
if pos.y < -64 then
|
||||
-- Player reached the void, set black sky box
|
||||
player:set_sky("#000000", "plain")
|
||||
else
|
||||
player:set_sky(nil, "regular")
|
||||
end
|
||||
if pos.y < -64 -64 then
|
||||
-- Player is deep into the void, deal void damage
|
||||
if player:get_hp() > 0 then
|
||||
player:set_hp(player:get_hp() - 4)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue