parse beatmap timing points when main menu wants it :>
This commit is contained in:
parent
cd54352865
commit
de2ddfc151
|
@ -369,13 +369,13 @@ public class MainMenu extends BasicGameState {
|
||||||
int trackposition = MusicController.getPosition();
|
int trackposition = MusicController.getPosition();
|
||||||
TimingPoint p = null;
|
TimingPoint p = null;
|
||||||
float beatlen = 0f;
|
float beatlen = 0f;
|
||||||
//int time = 0;
|
int time = 0;
|
||||||
for (TimingPoint pts : map.timingPoints) {
|
for (TimingPoint pts : map.timingPoints) {
|
||||||
if (p == null || pts.getTime() < MusicController.getPosition()) {
|
if (p == null || pts.getTime() < MusicController.getPosition()) {
|
||||||
p = pts;
|
p = pts;
|
||||||
if (!p.isInherited() && p.getBeatLength() > 0) {
|
if (!p.isInherited() && p.getBeatLength() > 0) {
|
||||||
beatlen = p.getBeatLength();
|
beatlen = p.getBeatLength();
|
||||||
//time = p.getTime();
|
time = p.getTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ public class MainMenu extends BasicGameState {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
double beatLength = beatlen * 100;
|
double beatLength = beatlen * 100;
|
||||||
return (((trackposition * 100/* - time * 100 idk.. */) % beatLength) / beatLength);
|
return (((trackposition * 100 - time * 100) % beatLength) / beatLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user