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

Merge branch 'master' into no-more-memory-sqlite

This commit is contained in:
Dean Herbert 2018-07-20 16:17:36 +09:00 committed by GitHub
commit 0e7bb3b548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,8 @@ namespace osu.Game.Rulesets.Objects.Legacy
{ {
string[] split = text.Split(','); string[] split = text.Split(',');
Vector2 pos = new Vector2((int)Convert.ToSingle(split[0], CultureInfo.InvariantCulture), (int)Convert.ToSingle(split[1], CultureInfo.InvariantCulture));
ConvertHitObjectType type = (ConvertHitObjectType)int.Parse(split[3]) & ~ConvertHitObjectType.ColourHax; ConvertHitObjectType type = (ConvertHitObjectType)int.Parse(split[3]) & ~ConvertHitObjectType.ColourHax;
bool combo = type.HasFlag(ConvertHitObjectType.NewCombo); bool combo = type.HasFlag(ConvertHitObjectType.NewCombo);
type &= ~ConvertHitObjectType.NewCombo; type &= ~ConvertHitObjectType.NewCombo;
@ -41,15 +43,13 @@ namespace osu.Game.Rulesets.Objects.Legacy
if (type.HasFlag(ConvertHitObjectType.Circle)) if (type.HasFlag(ConvertHitObjectType.Circle))
{ {
result = CreateHit(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo); result = CreateHit(pos, combo);
if (split.Length > 5) if (split.Length > 5)
readCustomSampleBanks(split[5], bankInfo); readCustomSampleBanks(split[5], bankInfo);
} }
else if (type.HasFlag(ConvertHitObjectType.Slider)) else if (type.HasFlag(ConvertHitObjectType.Slider))
{ {
var pos = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
CurveType curveType = CurveType.Catmull; CurveType curveType = CurveType.Catmull;
double length = 0; double length = 0;
var points = new List<Vector2> { Vector2.Zero }; var points = new List<Vector2> { Vector2.Zero };
@ -170,7 +170,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo); readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo);
} }
result = CreateHold(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo, endTime + offset); result = CreateHold(pos, combo, endTime + offset);
} }
if (result == null) if (result == null)