File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ private void ProcessBPMEvent()
374374 var nextOffset = ( i + 1 < Beatmap . TimingPoints . Count ) ?
375375 Beatmap . TimingPoints [ i + 1 ] . Offset :
376376 Beatmap . GeneralSection . Length ;
377- double calculatedBPM = TP . BeatLength ! = 0 ? ( Math . Round ( 60000.0 / Math . Abs ( TP . BeatLength ) , 3 ) ) : 0 ;
377+ double calculatedBPM = TP . BeatLength < = 0 ? TP . BeatLength : Math . Round ( 60000.0 / TP . BeatLength , 3 ) ;
378378 var bpmEvent = new BPMEvent
379379 {
380380 Offset = TP . Offset ,
@@ -384,10 +384,11 @@ private void ProcessBPMEvent()
384384 } ;
385385 Beatmap . BPMEvents . Add ( bpmEvent ) ;
386386 }
387+ Beatmap . BPMEvents . RemoveAll ( bpmEvent => bpmEvent . BeatLength < 0 ) ;
387388 Beatmap . BPMEvents . Sort ( ( x , y ) => x . Offset . CompareTo ( y . Offset ) ) ;
388389 Beatmap . MaxBPM = Beatmap . BPMEvents . Max ( x => x . BPM ) ;
389390 Beatmap . MinBPM = Beatmap . BPMEvents . Min ( x => x . BPM ) ;
390- Beatmap . BPMEvents . RemoveAll ( bpmEvent => bpmEvent . BeatLength < 0 ) ;
391+
391392 for ( int i = 0 ; i < Beatmap . BPMEvents . Count ; i ++ )
392393 {
393394 if ( i < Beatmap . BPMEvents . Count - 1 )
You can’t perform that action at this time.
0 commit comments