mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-06-30 15:30:28 +02:00
Check for NaN values in settings
This commit is contained in:
@ -2,6 +2,8 @@ local kill_nearest_player = function(pos)
|
||||
local MAX_DISTANCE = tonumber(minetest.setting_get("moremesecons_playerkiller.max_distance")) or 8 -- Use this number to set maximal distance to kill
|
||||
if MAX_DISTANCE <= 0 then
|
||||
MAX_DISTANCE = 8
|
||||
elseif MAX_DISTANCE ~= MAX_DISTANCE then -- NaN
|
||||
MAX_DISTANCE = 8
|
||||
end
|
||||
|
||||
-- Search the nearest player
|
||||
|
Reference in New Issue
Block a user