Skip to content

Commit

Permalink
go back to zeroing out time at element 0 in serializenotedata functions
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 14, 2020
1 parent 98f4e04 commit f46d4d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Etterna/Models/NoteData/NoteData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ NoteData::SerializeNoteData(const vector<float>& etaner)
}

if (rowNotes != 0) {
NoteInfo rowOutput{ static_cast<unsigned int>(rowNotes), etaner[i] };
// see note in serialize 2 about zeroing out element 0
NoteInfo rowOutput{ static_cast<unsigned int>(rowNotes), etaner[i] - etaner[0]};
SerializedNoteData.emplace_back(rowOutput);
}
}
Expand Down Expand Up @@ -253,8 +254,13 @@ NoteData::SerializeNoteData2(TimingData* ts,
for (auto r : NonEmptyRowVector) {
// only send tap data to calc
if (lal.at(r) != 128) {
// zeroing out the first line makes debug output more annoying to
// deal with, since we have to add back the file offset to make the
// graphs line up with the cdgraphs, however, if we don't do this
// offset will affect msd which is extremely stupid practically and
// conceptually
NoteInfo rowOutput{ static_cast<unsigned int>(lal.at(r)),
etaner[idx] };
etaner[idx] - etaner[0] };
SerializedNoteData.emplace_back(rowOutput);
}
++idx;
Expand Down

0 comments on commit f46d4d4

Please sign in to comment.