1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Use a const for excess length

This commit is contained in:
smoogipoo 2018-06-28 11:46:56 +09:00
parent c0c94e24b9
commit 87e8074cd2

View File

@ -14,6 +14,8 @@ namespace osu.Game.Beatmaps
/// </summary>
protected class VirtualBeatmapTrack : TrackVirtual
{
private const double excess_length = 1000;
private readonly IBeatmap beatmap;
public VirtualBeatmapTrack(IBeatmap beatmap)
@ -35,13 +37,13 @@ namespace osu.Game.Beatmaps
switch (lastObject)
{
case null:
Length = 1000;
Length = excess_length;
break;
case IHasEndTime endTime:
Length = endTime.EndTime + 1000;
Length = endTime.EndTime + excess_length;
break;
default:
Length = lastObject.StartTime + 1000;
Length = lastObject.StartTime + excess_length;
break;
}
}