Adjust Swell hit speed.

This commit is contained in:
smoogipooo 2017-04-26 16:28:53 +09:00
parent 36c649f965
commit 8df3c3f736

View File

@ -11,6 +11,8 @@ namespace osu.Game.Rulesets.Taiko.Replays
{ {
public class TaikoAutoReplay : Replay public class TaikoAutoReplay : Replay
{ {
private const double swell_hit_speed = 50;
private readonly Beatmap<TaikoHitObject> beatmap; private readonly Beatmap<TaikoHitObject> beatmap;
public TaikoAutoReplay(Beatmap<TaikoHitObject> beatmap) public TaikoAutoReplay(Beatmap<TaikoHitObject> beatmap)
@ -45,12 +47,13 @@ namespace osu.Game.Rulesets.Taiko.Replays
int d = 0; int d = 0;
int count = 0; int count = 0;
int req = swell.RequiredHits; int req = swell.RequiredHits;
double hitRate = swell.Duration / req; double hitRate = Math.Min(swell_hit_speed, swell.Duration / req);
for (double j = h.StartTime; j < endTime; j += hitRate) for (double j = h.StartTime; j < endTime; j += hitRate)
{ {
switch (d) switch (d)
{ {
default: default:
case 0:
button = ReplayButtonState.Left1; button = ReplayButtonState.Left1;
break; break;
case 1: case 1:
@ -66,7 +69,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
Frames.Add(new ReplayFrame(j, null, null, button)); Frames.Add(new ReplayFrame(j, null, null, button));
d = (d + 1) % 4; d = (d + 1) % 4;
if (++count > req) if (++count == req)
break; break;
} }
} }