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

Merge branch 'master' into fix-model-import

This commit is contained in:
Dean Herbert 2018-07-20 16:17:39 +09:00 committed by GitHub
commit 92fe996a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -88,7 +88,8 @@ namespace osu.Game.Rulesets.Taiko.Scoring
AddJudgement(new TaikoStrongHitJudgement()); AddJudgement(new TaikoStrongHitJudgement());
break; break;
case DrumRoll drumRoll: case DrumRoll drumRoll:
for (int i = 0; i < drumRoll.NestedHitObjects.OfType<DrumRollTick>().Count(); i++) var count = drumRoll.NestedHitObjects.OfType<DrumRollTick>().Count();
for (int i = 0; i < count; i++)
{ {
AddJudgement(new TaikoDrumRollTickJudgement { Result = HitResult.Great }); AddJudgement(new TaikoDrumRollTickJudgement { Result = HitResult.Great });

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)