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:
@ -19,6 +19,8 @@ local function is_jammed(pos)
|
||||
local JAMMER_MAX_DISTANCE = tonumber(minetest.setting_get(moresecons_jammer.max_distance)) or 10
|
||||
if JAMMER_MAX_DISTANCE <= 0 then
|
||||
JAMMER_MAX_DISTANCE = 1
|
||||
elseif JAMMER_MAX_DISTANCE ~= JAMMER_MAX_DISTANCE then -- NaN
|
||||
JAMMER_MAX_DISTANCE = 10
|
||||
end
|
||||
|
||||
local pz,py,px = vector.unpack(pos)
|
||||
|
Reference in New Issue
Block a user