@@ -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