mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 06:52:59 +08:00
Add new error for malformed (too many variables) hit objects during import
This commit is contained in:
parent
64d92c1557
commit
c16dbc05aa
@ -20,6 +20,9 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
public override HitObject Parse(string text)
|
public override HitObject Parse(string text)
|
||||||
{
|
{
|
||||||
string[] split = text.Split(',');
|
string[] split = text.Split(',');
|
||||||
|
if (split.Length > 11)
|
||||||
|
throw new InvalidOperationException("One or more hit objects were malformed.");
|
||||||
|
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user