Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
@ -3145,6 +3145,7 @@ class PlayState extends MusicBeatState
|
||||
if (controls.RIGHT_P){luaModchart.executeState('keyPressed',["right"]);};
|
||||
};
|
||||
#end
|
||||
|
||||
|
||||
// Prevent player input if botplay is on
|
||||
if(PlayStateChangeables.botPlay)
|
||||
@ -3154,6 +3155,11 @@ class PlayState extends MusicBeatState
|
||||
releaseArray = [false, false, false, false];
|
||||
}
|
||||
|
||||
var anas:Array<Ana> = [null,null,null,null];
|
||||
|
||||
for (i in 0...pressArray.length)
|
||||
if (pressArray[i])
|
||||
anas[i] = new Ana(Conductor.songPosition, null, false, "miss", i);
|
||||
|
||||
// HOLDS, check for sustain notes
|
||||
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
||||
@ -3165,14 +3171,8 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
if (KeyBinds.gamepad && !FlxG.keys.pressed.ANY)
|
||||
if (KeyBinds.gamepad && !FlxG.keys.justPressed.ANY)
|
||||
{
|
||||
var anas:Array<Ana> = [null,null,null,null];
|
||||
|
||||
for (i in 0...pressArray.length)
|
||||
if (pressArray[i])
|
||||
anas[i] = new Ana(Conductor.songPosition, null, false, "miss", i);
|
||||
|
||||
// PRESSES, check for note hits
|
||||
if (pressArray.contains(true) && generatedMusic)
|
||||
{
|
||||
@ -3189,34 +3189,13 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
if (!directionsAccounted[daNote.noteData])
|
||||
{
|
||||
if (directionList.contains(daNote.noteData))
|
||||
{
|
||||
directionsAccounted[daNote.noteData] = true;
|
||||
for (coolNote in possibleNotes)
|
||||
{
|
||||
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
||||
{ // if it's the same note twice at < 10ms distance, just delete it
|
||||
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
|
||||
dumbNotes.push(daNote);
|
||||
break;
|
||||
}
|
||||
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
|
||||
{ // if daNote is earlier than existing note (coolNote), replace
|
||||
possibleNotes.remove(coolNote);
|
||||
possibleNotes.push(daNote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
possibleNotes.push(daNote);
|
||||
directionList.push(daNote.noteData);
|
||||
}
|
||||
directionsAccounted[daNote.noteData] = true;
|
||||
possibleNotes.push(daNote);
|
||||
directionList.push(daNote.noteData);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
trace('notes that can be hit: ' + possibleNotes.length);
|
||||
for (note in dumbNotes)
|
||||
{
|
||||
FlxG.log.add("killing dumb ass note at " + note.strumTime);
|
||||
@ -3226,7 +3205,6 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
|
||||
|
||||
if (perfectMode)
|
||||
goodNoteHit(possibleNotes[0]);
|
||||
else if (possibleNotes.length > 0)
|
||||
@ -3260,15 +3238,13 @@ class PlayState extends MusicBeatState
|
||||
if (pressArray[shit])
|
||||
noteMiss(shit, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!loadRep)
|
||||
for (i in anas)
|
||||
if (i != null)
|
||||
replayAna.anaArray.push(i); // put em all there*/
|
||||
replayAna.anaArray.push(i); // put em all there
|
||||
}
|
||||
|
||||
notes.forEachAlive(function(daNote:Note)
|
||||
{
|
||||
if(PlayStateChangeables.useDownscroll && daNote.y > strumLine.y ||
|
||||
|
Reference in New Issue
Block a user