Skip to content

Commit

Permalink
if other stuff uses this.. we can't set last to now until the start
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 10, 2020
1 parent c1fdc11 commit e72b3cb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ struct Anchor_Sequencing

// row_time of last note on this col
float _last = s_init;
float _now = s_init;
float _start = s_init;

inline void full_reset()
Expand All @@ -81,9 +82,16 @@ struct Anchor_Sequencing

inline void operator()(const col_type ct, const float& now)
{
_last = _now;

assert(ct == _ct);
_sc_ms = ms_from(now, _last);

if (ct == col_init) {
_last = now;
return;
}

// break the anchor if the next note is too much slower than the
// lowest one in the sequence, remember, if we reset the start of the
// new anchor was the last row_time, and the new max_ms should be the
Expand Down Expand Up @@ -127,7 +135,7 @@ struct Anchor_Sequencing
}

// update row time after any potential resets
_last = now;
_now = now;
}

inline auto get_difficulty() -> float
Expand Down

0 comments on commit e72b3cb

Please sign in to comment.