mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Fix spinners providing one extra combo
This commit is contained in:
parent
12b81df2f3
commit
eb6f1ae72c
@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int SpinsRequired { get; protected set; } = 1;
|
public int SpinsRequired { get; protected set; } = 1;
|
||||||
|
|
||||||
public override bool NewCombo => true;
|
|
||||||
|
|
||||||
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||||
|
@ -18,8 +18,17 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool forceNewCombo;
|
||||||
|
private int extraComboOffset;
|
||||||
|
|
||||||
protected override HitObject CreateHit(Vector2 position, bool newCombo, int comboOffset)
|
protected override HitObject CreateHit(Vector2 position, bool newCombo, int comboOffset)
|
||||||
{
|
{
|
||||||
|
newCombo |= forceNewCombo;
|
||||||
|
comboOffset += extraComboOffset;
|
||||||
|
|
||||||
|
forceNewCombo = false;
|
||||||
|
extraComboOffset = 0;
|
||||||
|
|
||||||
return new ConvertHit
|
return new ConvertHit
|
||||||
{
|
{
|
||||||
X = position.X,
|
X = position.X,
|
||||||
@ -30,6 +39,12 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
|
|||||||
|
|
||||||
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount, List<List<SampleInfo>> repeatSamples)
|
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount, List<List<SampleInfo>> repeatSamples)
|
||||||
{
|
{
|
||||||
|
newCombo |= forceNewCombo;
|
||||||
|
comboOffset += extraComboOffset;
|
||||||
|
|
||||||
|
forceNewCombo = false;
|
||||||
|
extraComboOffset = 0;
|
||||||
|
|
||||||
return new ConvertSlider
|
return new ConvertSlider
|
||||||
{
|
{
|
||||||
X = position.X,
|
X = position.X,
|
||||||
@ -45,11 +60,12 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
|
|||||||
|
|
||||||
protected override HitObject CreateSpinner(Vector2 position, bool newCombo, int comboOffset, double endTime)
|
protected override HitObject CreateSpinner(Vector2 position, bool newCombo, int comboOffset, double endTime)
|
||||||
{
|
{
|
||||||
|
forceNewCombo |= FormatVersion <= 8 || newCombo;
|
||||||
|
extraComboOffset += comboOffset;
|
||||||
|
|
||||||
return new ConvertSpinner
|
return new ConvertSpinner
|
||||||
{
|
{
|
||||||
EndTime = endTime,
|
EndTime = endTime
|
||||||
NewCombo = FirstObject || newCombo,
|
|
||||||
ComboOffset = comboOffset
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,17 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool forceNewCombo;
|
||||||
|
private int extraComboOffset;
|
||||||
|
|
||||||
protected override HitObject CreateHit(Vector2 position, bool newCombo, int comboOffset)
|
protected override HitObject CreateHit(Vector2 position, bool newCombo, int comboOffset)
|
||||||
{
|
{
|
||||||
|
newCombo |= forceNewCombo;
|
||||||
|
comboOffset += extraComboOffset;
|
||||||
|
|
||||||
|
forceNewCombo = false;
|
||||||
|
extraComboOffset = 0;
|
||||||
|
|
||||||
return new ConvertHit
|
return new ConvertHit
|
||||||
{
|
{
|
||||||
Position = position,
|
Position = position,
|
||||||
@ -31,6 +40,12 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
|||||||
|
|
||||||
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount, List<List<SampleInfo>> repeatSamples)
|
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount, List<List<SampleInfo>> repeatSamples)
|
||||||
{
|
{
|
||||||
|
newCombo |= forceNewCombo;
|
||||||
|
comboOffset += extraComboOffset;
|
||||||
|
|
||||||
|
forceNewCombo = false;
|
||||||
|
extraComboOffset = 0;
|
||||||
|
|
||||||
return new ConvertSlider
|
return new ConvertSlider
|
||||||
{
|
{
|
||||||
Position = position,
|
Position = position,
|
||||||
@ -46,12 +61,13 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
|||||||
|
|
||||||
protected override HitObject CreateSpinner(Vector2 position, bool newCombo, int comboOffset, double endTime)
|
protected override HitObject CreateSpinner(Vector2 position, bool newCombo, int comboOffset, double endTime)
|
||||||
{
|
{
|
||||||
|
forceNewCombo |= FormatVersion <= 8 || newCombo;
|
||||||
|
extraComboOffset += comboOffset;
|
||||||
|
|
||||||
return new ConvertSpinner
|
return new ConvertSpinner
|
||||||
{
|
{
|
||||||
Position = position,
|
Position = position,
|
||||||
EndTime = endTime,
|
EndTime = endTime
|
||||||
NewCombo = FormatVersion <= 8 || FirstObject || newCombo,
|
|
||||||
ComboOffset = comboOffset
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user