Skip to content

Commit 8063c8a

Browse files
committed
fix beatmap arguments
1 parent b9d99da commit 8063c8a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

OsuLiveStatusPanel/PPShow/BeatmapInfoHanlder/CTB/CTBPPCalculator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void SetBeatmap(OsuRTDataProvider.BeatmapInfo.Beatmap beatmap)
2727
return;
2828
}
2929

30-
ctb_pp_calc.Beatmap = new RealTimePPDisplayer.Beatmap.BeatmapReader(beatmap, OsuRTDataProvider.Listen.OsuPlayMode.Mania);
30+
ctb_pp_calc.Beatmap = new RealTimePPDisplayer.Beatmap.BeatmapReader(beatmap, OsuRTDataProvider.Listen.OsuPlayMode.CatchTheBeat);
3131
}
3232

3333
public void SetMod(Mods.ModsInfo modsInfo)
@@ -55,16 +55,16 @@ enum RequireType
5555
{
5656
try
5757
{
58+
if (calc_cache == null)
59+
calc_cache = ctb_pp_calc.SendCalculateCtb(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods);
5860
switch (require)
5961
{
6062
case RequireType.PP:
61-
if (calc_cache == null)
62-
calc_cache = SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods);
6363
return CalculatePp(calc_cache, ctb_pp_calc.Mods, acc, calc_cache.FullCombo, 0);
6464
case RequireType.Star:
65-
return SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods).Stars;
65+
return calc_cache.Stars;
6666
case RequireType.AR:
67-
return SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods).ApproachRate;
67+
return calc_cache.ApproachRate;
6868
default:
6969
return null;
7070
}

0 commit comments

Comments
 (0)