sort the playerlist by score

This commit is contained in:
yugecin 2017-03-29 23:59:38 +02:00
parent 00f34296fb
commit e270aeb92e

View File

@ -1471,7 +1471,7 @@ public class Game extends ComplexOpsuState {
super.enter(); super.enter();
File replaydir = new File("d:/Users/Robin/games/osu/osr-stuff-master/opsud/"); File replaydir = new File("d:/Users/Robin/games/osu/osr-stuff-master/raize/");
File[] files = replaydir.listFiles(new FileFilter() { File[] files = replaydir.listFiles(new FileFilter() {
@Override @Override
public boolean accept(File pathname) { public boolean accept(File pathname) {
@ -1494,6 +1494,13 @@ public class Game extends ComplexOpsuState {
hue += hueshift; hue += hueshift;
} }
replays.sort(new Comparator<ReplayPlayback>() {
@Override
public int compare(ReplayPlayback o1, ReplayPlayback o2) {
return Integer.compare(o2.replay.score, o1.replay.score);
}
});
if (isReplay || GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) { if (isReplay || GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) {
displayContainer.drawCursor = false; displayContainer.drawCursor = false;
} }