Skip to content

Commit b99b5dd

Browse files
committed
why haven't i noticed this bug
1 parent 5521244 commit b99b5dd

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

source/states/FreeplayState.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class FreeplayState extends MusicBeatState
292292
while (loading < songs.length) {
293293
loadSong(loading++);
294294
delayTime = Timer.stamp() - stampTime;
295-
if (delayTime > 1 / Math.max(ClientPrefs.data.framerate, 30) || loading >= songs.length) {
295+
if (delayTime > 1 / Math.min(ClientPrefs.data.framerate, 30) || loading >= songs.length) {
296296
var curr = "", total = "", prog = CoolUtil.floatToStringPrecision(loading * 100.0 / songs.length, 1);
297297

298298
if (ClientPrefs.data.numberFormat) {
@@ -302,9 +302,9 @@ class FreeplayState extends MusicBeatState
302302
curr = Std.string(loading); total = Std.string(songs.length);
303303
}
304304

305-
Eseq.p('Loading Song - $curr / $total - $prog % Done');
305+
Eseq.p('Loading Songs - $curr / $total - $prog %');
306306

307-
loadingText.text = 'Loading Song...\n$curr / $total - $prog % Done';
307+
loadingText.text = 'Loading Songs...\n$curr / $total - $prog %';
308308
loadingText.screenCenter();
309309

310310
stampTime = Timer.stamp();

source/states/editors/ChartingState.hx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,10 +3119,12 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
31193119
var maxTime:Float;
31203120
var nextMinTime:Float;
31213121
var nextMaxTime:Float;
3122-
var firstNote:Bool = false;
3123-
var firstEvent:Bool = false;
3122+
var firstNote = false;
3123+
var firstEvent = false;
31243124

3125-
function softReloadNotes(onlyCurrent:Bool = false)
3125+
var inRange = false;
3126+
3127+
function softReloadNotes(onlyCurrent = false)
31263128
{
31273129
index = 0;
31283130
if (!onlyCurrent)
@@ -3135,6 +3137,7 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
31353137
{
31363138
return (minTime <= t && t < maxTime);
31373139
}
3140+
trace(minTime, maxTime);
31383141

31393142
firstNote = false;
31403143
firstEvent = false;
@@ -3143,16 +3146,16 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
31433146

31443147
for (cursed => sections in curSong.notes)
31453148
{
3146-
if (sections.sectionNotes == null || sections.sectionNotes.length == 0)
3147-
continue;
3148-
trace(minTime, sections.sectionNotes[0][0], maxTime);
3149-
if (!curSecFilter(sections.sectionNotes[0][0]))
3149+
if (sections.sectionNotes == null || sections.sectionNotes.length == 0) continue;
3150+
inRange = curSecFilter(sections.sectionNotes[0][0]);
3151+
trace('section ${cursed+1}: ${sections.sectionNotes[0]} isCurrent: $inRange');
3152+
if (!inRange)
31503153
{
31513154
if (sections.sectionNotes[0][0] >= maxTime) break;
31523155
index += curSong.notes.length;
31533156
continue;
31543157
}
3155-
// trace('current section ${cursed+1}: ${sections.sectionNotes[0]}');
3158+
31563159
for (note in sections.sectionNotes)
31573160
{
31583161
if (note != null)
@@ -3266,7 +3269,7 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
32663269

32673270
function getMinNoteTime(sec:Int)
32683271
{
3269-
minTime = Math.NEGATIVE_INFINITY;
3272+
minTime = 0;
32703273
if (sec > 0)
32713274
minTime = cachedSectionTimes[sec];
32723275
return minTime;

0 commit comments

Comments
 (0)