Iterate through all lanes when adding a note to see if it matches another hold note.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago
parent 3ca3168f30
commit d9815aeafb
  1. 31
      LLSIG/src/main/java/LLSIG/Lane.java
  2. 1
      LLSIG/src/main/java/LLSIG/Note.java

@ -65,6 +65,37 @@ public class Lane{
break;
}
}
for (Lane l : LLSIG.game.lanes) {
if (l!=this) {
for (Note nn : l.noteChart) {
if (nn.start==n.start) {
nn.multiple=true;
n.multiple=true;
}
if (n.getNoteType()==NoteType.HOLD) {
if (nn.getNoteType()==NoteType.HOLD) {
if (n.start==nn.end) {
nn.multiple2=true;
n.multiple=true;
}
if (n.end==nn.start) {
nn.multiple=true;
n.multiple2=true;
} else
if (n.end==nn.end) {
nn.multiple2=true;
n.multiple2=true;
}
} else {
if (n.end==nn.start) {
nn.multiple=true;
n.multiple2=true;
}
}
}
}
}
}
if (!added) {
noteChart.add(n);
}

@ -8,6 +8,7 @@ public class Note {
double beatSnapStart,beatSnapEnd = -1;
boolean deleted=false; //Set this marker to delete it on the next frame (when using the editor)
boolean multiple=false; //Whether or not to display an indicator showing this is a multi-press note.
boolean multiple2=false; //Whether or not to display an indicator showing this is a multi-press note for the ending of the hold.
public Note(NoteType type,double start,double end) {
this.type=type;
this.start=start;

Loading…
Cancel
Save