Handle hold note judgement endings. Fix rendering and removed unnecessary note removal

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago
parent 657d380161
commit 912907cb1b
  1. 2
      LLSIG/src/main/java/LLSIG/Canvas.java
  2. 14
      LLSIG/src/main/java/LLSIG/LLSIG.java
  3. 2
      LLSIG/src/main/java/LLSIG/Lane.java

@ -162,7 +162,7 @@ public class Canvas extends JPanel implements AudioSpectrumListener{
int noteCounter = 0;
while (lane.noteExists(noteCounter)) {
Note n = lane.getNote(noteCounter);
if (n.active) {
if (n.active||n.active2) {
double PLAYTIME_RATIO = (1-(((double)n.getStartFrame()-LLSIG.game.musicPlayer.getPlayPosition())/LLSIG.game.NOTE_SPEED));
double PLAYTIME_END_RATIO = (1-(((double)n.getEndFrame()-LLSIG.game.musicPlayer.getPlayPosition())/LLSIG.game.NOTE_SPEED));
if (n.getNoteType()==NoteType.HOLD) {

@ -346,11 +346,6 @@ public class LLSIG implements KeyListener{
if (l.noteExists()) {
Note n = l.getNote();
double diff = n.getStartFrame()-LLSIG.game.musicPlayer.getPlayPosition();
double diff2 = n.getEndFrame()-LLSIG.game.musicPlayer.getPlayPosition();
if (n.getNoteType()==NoteType.HOLD&&n.active2&&!n.active&&diff2<=BAD_TIMING_WINDOW) {
judgeNote(l, diff2);
n.active2=false;
}
if (n.active&&diff<=BAD_TIMING_WINDOW) {
judgeNote(l, diff);
n.active=false;
@ -397,6 +392,15 @@ public class LLSIG implements KeyListener{
}
if (lane!=-1) {
keyState[lane]=false;
Lane l = lanes.get(lane);
if (l.noteExists()) {
Note n = l.getNote();
double diff2 = n.getEndFrame()-LLSIG.game.musicPlayer.getPlayPosition();
if (n.getNoteType()==NoteType.HOLD&&n.active2&&!n.active&&diff2<=BAD_TIMING_WINDOW) {
judgeNote(l, diff2);
n.active2=false;
}
}
}
}
}

@ -26,7 +26,7 @@ public class Lane{
for (int i=noteOffset;i<noteChart.size();i++)
{
Note n = noteChart.get(i);
if (n.active) {return n;}
if (n.active||n.active2) {return n;}
}
return null;
}

Loading…
Cancel
Save