mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-18 17:16:48 +00:00
Idle is optional and could be nil
This commit is contained in:
parent
739ff70a82
commit
686fdb057d
1 changed files with 11 additions and 9 deletions
|
@ -22,6 +22,7 @@ local function startPackage(args)
|
||||||
local key = "idle"
|
local key = "idle"
|
||||||
local idle = {}
|
local idle = {}
|
||||||
local duration = 0
|
local duration = 0
|
||||||
|
if args.idle then
|
||||||
for i = 2, 9 do
|
for i = 2, 9 do
|
||||||
local val = args.idle[key .. i]
|
local val = args.idle[key .. i]
|
||||||
if val == nil then
|
if val == nil then
|
||||||
|
@ -34,6 +35,7 @@ local function startPackage(args)
|
||||||
idle[i-1] = v
|
idle[i-1] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if args.duration then
|
if args.duration then
|
||||||
duration = args.duration / 3600
|
duration = args.duration / 3600
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue