1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Add a check to make sure all hitobjects use relativepositionaxes

This commit is contained in:
Dean Herbert 2017-06-15 14:42:25 +09:00
parent 021019648e
commit 585e7ba312

View File

@ -40,6 +40,9 @@ namespace osu.Game.Rulesets.Timing
/// <param name="hitObject">The hit object to add.</param>
public void Add(DrawableHitObject hitObject)
{
if (hitObject.RelativePositionAxes == Axes.None)
throw new InvalidOperationException($"Make sure to set all {nameof(DrawableHitObject)}'s {nameof(RelativePositionAxes)} to some axis of relativity");
var target = adjustmentContainerFor(hitObject);
if (target == null)