Skip to content

Commit

Permalink
engine: update timeline level probabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Feb 20, 2017
1 parent 276e3c5 commit 563ae7a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/core/app.lua
Expand Up @@ -433,11 +433,13 @@ function breathe ()
-- Sample events with dynamic priorities.
-- Lower priorities are enabled 1/10th as often as the one above.
local r = math.random()
if r < 0.00001 then timeline_mod.level(timeline_log, 2)
elseif r < 0.00010 then timeline_mod.level(timeline_log, 3)
elseif r < 0.01000 then timeline_mod.level(timeline_log, 4)
elseif r < 0.10000 then timeline_mod.level(timeline_log, 5)
else timeline_mod.level(timeline_log, 6)
if r < 0.000001 then timeline_mod.level(timeline_log, 1)
elseif r < 0.000010 then timeline_mod.level(timeline_log, 2)
elseif r < 0.000100 then timeline_mod.level(timeline_log, 3)
elseif r < 0.001000 then timeline_mod.level(timeline_log, 4)
elseif r < 0.010000 then timeline_mod.level(timeline_log, 5)
elseif r < 0.100000 then timeline_mod.level(timeline_log, 6)
else timeline_mod.level(timeline_log, 7)
end
running = false
end
Expand Down

0 comments on commit 563ae7a

Please sign in to comment.