Skip to content

Commit

Permalink
Use measure instead of start_time for timings
Browse files Browse the repository at this point in the history
This is important!!! fixes #40
  • Loading branch information
xerool committed Sep 15, 2021
1 parent 0f460ac commit a1ccd82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions template/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,10 @@
local function run_eases(beat, time)
-- {start_beat, len, ease, p0, m0, p1, m1, p2, m2, p3, m3}
while eases_index <= #eases and eases[eases_index].start_time < time do
while eases_index <= #eases do
local e = eases[eases_index]
local measure = e.time and time or beat
if measure < e[1] then break end
local plr = e.plr
if e.reset then
if e.only then
Expand Down Expand Up @@ -800,9 +802,10 @@
return x * x * y < x * y * y
end)
local function run_funcs(beat, time)
while funcs_index <= #funcs and funcs[funcs_index].start_time < time do
while funcs_index <= #funcs do
local e = funcs[funcs_index]
local measure = e.time and time or beat
if measure < e[1] then break end
if not e[2] then
e[3](measure)
elseif measure < e[1] + e[2] then
Expand Down

0 comments on commit a1ccd82

Please sign in to comment.