diff --git a/mods/default/player.lua b/mods/default/player.lua index 5e8ad6f..9da8991 100644 --- a/mods/default/player.lua +++ b/mods/default/player.lua @@ -3,10 +3,17 @@ local player_lastsound = {} local player_health = {} local function step(dtime) - for _,player in ipairs(minetest.get_connected_players()) do + for _, player in ipairs(minetest.get_connected_players()) do local player_pos=player:getpos() local name=player:get_player_name() + if player_pos.x < -30000 or player_pos.x > 30000 + or player_pos.y < -30000 or player_pos.y > 30000 + or player_pos.z < -30000 or player_pos.z > 30000 then + minetest.chat_send_player(name, "Don't go past 30000m in any direction!") + player.set_hp(0) + end + if player:get_hp() < player_health[name] then minetest.sound_play( "default_hurt",