Skip to content

Commit

Permalink
fix the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
khang06 committed May 28, 2020
1 parent 682caf4 commit c302668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Chikara/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,9 +1402,9 @@ void Renderer::drawFrame(float time)
notes_hidden[i]++;
} else {
size_t start = max(0, (n.start - time) / pre_time * NOTE_DEPTH_BUFFER_SIZE);
size_t end = min(NOTE_DEPTH_BUFFER_SIZE, (size_t)max(start, ((n.end - time) / pre_time * NOTE_DEPTH_BUFFER_SIZE)));
size_t end = min(NOTE_DEPTH_BUFFER_SIZE, max(start, ((n.end - time) / pre_time * NOTE_DEPTH_BUFFER_SIZE)));
n.hidden = false;
if (start >= end) // even after that casting hell it's not enough
if (start > end) // even after that casting hell it's not enough
return;
// fast path, will probably save a lot of time
if (!(depth_buf[start] && depth_buf[end])) {
Expand Down

0 comments on commit c302668

Please sign in to comment.