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 function initialize_data(meta)
|
||||
local NEAREST_MAX_DISTANCE = tonumber(minetest.setting_get("moremesecons_commandblock.nearest_max_distance")) or 8
|
||||
if NEAREST_MAX_DISTANCE <= 0 then
|
||||
NEAREST_MAX_DISTANCE = 1
|
||||
elseif NEAREST_MAX_DISTANCE ~= NEAREST_MAX_DISTANCE then -- NaN
|
||||
NEAREST_MAX_DISTANCE = 8
|
||||
end
|
||||
|
||||
local commands = meta:get_string("commands")
|
||||
|
Reference in New Issue
Block a user