Skip to content

Commit

Permalink
fix beatmap arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
KedamaOvO committed Aug 17, 2018
1 parent b9d99da commit 8063c8a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void SetBeatmap(OsuRTDataProvider.BeatmapInfo.Beatmap beatmap)
return;
}

ctb_pp_calc.Beatmap = new RealTimePPDisplayer.Beatmap.BeatmapReader(beatmap, OsuRTDataProvider.Listen.OsuPlayMode.Mania);
ctb_pp_calc.Beatmap = new RealTimePPDisplayer.Beatmap.BeatmapReader(beatmap, OsuRTDataProvider.Listen.OsuPlayMode.CatchTheBeat);
}

public void SetMod(Mods.ModsInfo modsInfo)
Expand Down Expand Up @@ -55,16 +55,16 @@ enum RequireType
{
try
{
if (calc_cache == null)
calc_cache = ctb_pp_calc.SendCalculateCtb(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods);
switch (require)
{
case RequireType.PP:
if (calc_cache == null)
calc_cache = SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods);
return CalculatePp(calc_cache, ctb_pp_calc.Mods, acc, calc_cache.FullCombo, 0);
case RequireType.Star:
return SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods).Stars;
return calc_cache.Stars;
case RequireType.AR:
return SendGetPp(new ArraySegment<byte>(this.ctb_pp_calc.Beatmap.RawData), ctb_pp_calc.Mods).ApproachRate;
return calc_cache.ApproachRate;
default:
return null;
}
Expand Down

0 comments on commit 8063c8a

Please sign in to comment.