mirror of https://github.com/ppy/osu
Fix handling of combo offset without new combo, and incorrect lazer tests
This commit is contained in:
parent
7bc2d6e6cd
commit
10e16e4b04
|
@ -434,12 +434,12 @@ public void TestDecodeBeatmapComboOffsetsOsu()
|
|||
new OsuBeatmapProcessor(converted).PreProcess();
|
||||
new OsuBeatmapProcessor(converted).PostProcess();
|
||||
|
||||
Assert.AreEqual(4, ((IHasComboInformation)converted.HitObjects.ElementAt(0)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(5, ((IHasComboInformation)converted.HitObjects.ElementAt(2)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(5, ((IHasComboInformation)converted.HitObjects.ElementAt(4)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(6, ((IHasComboInformation)converted.HitObjects.ElementAt(6)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(11, ((IHasComboInformation)converted.HitObjects.ElementAt(8)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(14, ((IHasComboInformation)converted.HitObjects.ElementAt(11)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(1, ((IHasComboInformation)converted.HitObjects.ElementAt(0)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(2, ((IHasComboInformation)converted.HitObjects.ElementAt(2)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(3, ((IHasComboInformation)converted.HitObjects.ElementAt(4)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(4, ((IHasComboInformation)converted.HitObjects.ElementAt(6)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(8, ((IHasComboInformation)converted.HitObjects.ElementAt(8)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(9, ((IHasComboInformation)converted.HitObjects.ElementAt(11)).ComboIndexWithOffsets);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,12 +457,12 @@ public void TestDecodeBeatmapComboOffsetsCatch()
|
|||
new CatchBeatmapProcessor(converted).PreProcess();
|
||||
new CatchBeatmapProcessor(converted).PostProcess();
|
||||
|
||||
Assert.AreEqual(4, ((IHasComboInformation)converted.HitObjects.ElementAt(0)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(5, ((IHasComboInformation)converted.HitObjects.ElementAt(2)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(5, ((IHasComboInformation)converted.HitObjects.ElementAt(4)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(6, ((IHasComboInformation)converted.HitObjects.ElementAt(6)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(11, ((IHasComboInformation)converted.HitObjects.ElementAt(8)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(14, ((IHasComboInformation)converted.HitObjects.ElementAt(11)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(1, ((IHasComboInformation)converted.HitObjects.ElementAt(0)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(2, ((IHasComboInformation)converted.HitObjects.ElementAt(2)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(3, ((IHasComboInformation)converted.HitObjects.ElementAt(4)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(4, ((IHasComboInformation)converted.HitObjects.ElementAt(6)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(8, ((IHasComboInformation)converted.HitObjects.ElementAt(8)).ComboIndexWithOffsets);
|
||||
Assert.AreEqual(9, ((IHasComboInformation)converted.HitObjects.ElementAt(11)).ComboIndexWithOffsets);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,30 +3,30 @@ osu file format v14
|
|||
[HitObjects]
|
||||
// Circle with combo offset (3)
|
||||
255,193,1000,49,0,0:0:0:0:
|
||||
// Combo index = 4
|
||||
// Combo index = 1
|
||||
|
||||
// Spinner with new combo followed by circle with no new combo
|
||||
256,192,2000,12,0,2000,0:0:0:0:
|
||||
255,193,3000,1,0,0:0:0:0:
|
||||
// Combo index = 5
|
||||
// Combo index = 2
|
||||
|
||||
// Spinner without new combo followed by circle with no new combo
|
||||
256,192,4000,8,0,5000,0:0:0:0:
|
||||
255,193,6000,1,0,0:0:0:0:
|
||||
// Combo index = 5
|
||||
// Combo index = 3
|
||||
|
||||
// Spinner without new combo followed by circle with new combo
|
||||
256,192,7000,8,0,8000,0:0:0:0:
|
||||
255,193,9000,5,0,0:0:0:0:
|
||||
// Combo index = 6
|
||||
// Combo index = 4
|
||||
|
||||
// Spinner with new combo and offset (1) followed by circle with new combo and offset (3)
|
||||
256,192,10000,28,0,11000,0:0:0:0:
|
||||
255,193,12000,53,0,0:0:0:0:
|
||||
// Combo index = 11
|
||||
// Combo index = 8
|
||||
|
||||
// Spinner with new combo and offset (2) followed by slider with no new combo followed by circle with no new combo
|
||||
256,192,13000,44,0,14000,0:0:0:0:
|
||||
256,192,15000,8,0,16000,0:0:0:0:
|
||||
255,193,17000,1,0,0:0:0:0:
|
||||
// Combo index = 14
|
||||
// Combo index = 9
|
|
@ -27,7 +27,7 @@ protected override HitObject CreateHit(Vector2 position, bool newCombo, int comb
|
|||
{
|
||||
Position = position,
|
||||
NewCombo = FirstObject || lastObject is ConvertSpinner || newCombo,
|
||||
ComboOffset = comboOffset
|
||||
ComboOffset = newCombo ? comboOffset : 0
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ protected override HitObject CreateSlider(Vector2 position, bool newCombo, int c
|
|||
{
|
||||
Position = position,
|
||||
NewCombo = FirstObject || lastObject is ConvertSpinner || newCombo,
|
||||
ComboOffset = comboOffset,
|
||||
ComboOffset = newCombo ? comboOffset : 0,
|
||||
Path = new SliderPath(controlPoints, length),
|
||||
NodeSamples = nodeSamples,
|
||||
RepeatCount = repeatCount
|
||||
|
|
|
@ -27,7 +27,7 @@ protected override HitObject CreateHit(Vector2 position, bool newCombo, int comb
|
|||
{
|
||||
Position = position,
|
||||
NewCombo = FirstObject || lastObject is ConvertSpinner || newCombo,
|
||||
ComboOffset = comboOffset
|
||||
ComboOffset = newCombo ? comboOffset : 0
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ protected override HitObject CreateSlider(Vector2 position, bool newCombo, int c
|
|||
{
|
||||
Position = position,
|
||||
NewCombo = FirstObject || lastObject is ConvertSpinner || newCombo,
|
||||
ComboOffset = comboOffset,
|
||||
ComboOffset = newCombo ? comboOffset : 0,
|
||||
Path = new SliderPath(controlPoints, length),
|
||||
NodeSamples = nodeSamples,
|
||||
RepeatCount = repeatCount
|
||||
|
|
Loading…
Reference in New Issue