1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Merge pull request #649 from peppy/general-fixes

Add a simulated key-up delay to auto replays
This commit is contained in:
Dan Balasescu 2017-04-18 23:26:25 +09:00 committed by GitHub
commit ba0357e33f
4 changed files with 7 additions and 5 deletions

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Position = s.Position;
//take up full playfield.
Size = OsuPlayfield.BASE_SIZE;
Size = new Vector2(OsuPlayfield.BASE_SIZE.X);
spinner = s;

View File

@ -213,7 +213,7 @@ namespace osu.Game.Rulesets.Osu
ReplayButtonState button = buttonIndex % 2 == 0 ? ReplayButtonState.Left1 : ReplayButtonState.Right1;
double hEndTime = (h as IHasEndTime)?.EndTime ?? h.StartTime;
double hEndTime = ((h as IHasEndTime)?.EndTime ?? h.StartTime) + KEY_UP_DELAY;
ReplayFrame newFrame = new ReplayFrame(h.StartTime, targetPosition.X, targetPosition.Y, button);
ReplayFrame endFrame = new ReplayFrame(hEndTime + endDelay, h.EndPosition.X, h.EndPosition.Y, ReplayButtonState.None);

View File

@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
else
throw new Exception("Unknown hit object type.");
Frames.Add(new ReplayFrame(endTime + 1, 0, 0, ReplayButtonState.None));
Frames.Add(new ReplayFrame(endTime + KEY_UP_DELAY, 0, 0, ReplayButtonState.None));
if (i < beatmap.HitObjects.Count - 1)
{
@ -113,4 +113,4 @@ namespace osu.Game.Rulesets.Taiko.Replays
}
}
}
}
}

View File

@ -7,6 +7,8 @@ namespace osu.Game.Rulesets.Replays
{
public class Replay
{
protected const double KEY_UP_DELAY = 50;
public List<ReplayFrame> Frames = new List<ReplayFrame>();
}
}
}