turns out timer duration can be a float
This commit is contained in:
parent
e0421fb64a
commit
6a3445e091
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ local function calculateFollowTime()
|
||||||
-- if player sneak is 100 or greater, guards won't follow at all
|
-- if player sneak is 100 or greater, guards won't follow at all
|
||||||
local max = tes3.hasCodePatchFeature(110) and (sneak <= 100 and 101 or 0) or 101
|
local max = tes3.hasCodePatchFeature(110) and (sneak <= 100 and 101 or 0) or 101
|
||||||
local value = (max - sneak) / 3
|
local value = (max - sneak) / 3
|
||||||
-- round to nearest integer and clamp to positive
|
-- clamp to positive
|
||||||
return math.clamp(math.round(value, 0), 0, math.huge)
|
return math.clamp(value, 0, math.huge)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function doChecks(e)
|
local function doChecks(e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue