1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix discarding too many RNG values, and add test

This commit is contained in:
smoogipoo 2018-06-13 18:39:26 +09:00
parent cbb883614a
commit cafdbc2d25
4 changed files with 108 additions and 4 deletions

View File

@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Catch.Tests
protected override string ResourceAssembly => "osu.Game.Rulesets.Catch"; protected override string ResourceAssembly => "osu.Game.Rulesets.Catch";
[TestCase("basic"), Ignore("See: https://github.com/ppy/osu/issues/2232")] [TestCase("basic"), Ignore("See: https://github.com/ppy/osu/issues/2232")]
[TestCase("spinner")]
public new void Test(string name) public new void Test(string name)
{ {
base.Test(name); base.Test(name);
@ -35,6 +36,17 @@ namespace osu.Game.Rulesets.Catch.Tests
}; };
} }
} }
else if (hitObject is BananaShower shower)
{
foreach (var nested in shower.NestedHitObjects)
{
yield return new ConvertValue
{
StartTime = nested.StartTime,
Position = ((CatchHitObject)nested).X * CatchPlayfield.BASE_WIDTH
};
}
}
else else
{ {
yield return new ConvertValue yield return new ConvertValue

View File

@ -48,10 +48,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
foreach (var nested in bananaShower.NestedHitObjects) foreach (var nested in bananaShower.NestedHitObjects)
{ {
((BananaShower.Banana)nested).X = (float)rng.NextDouble(); ((BananaShower.Banana)nested).X = (float)rng.NextDouble();
// discarding 3 times rng.Next(); // osu!stable retrieved a random banana type
rng.Next(); rng.Next(); // osu!stable retrieved a random banana rotation
rng.Next();
rng.Next();
} }
break; break;
case JuiceStream juiceStream: case JuiceStream juiceStream:

View File

@ -0,0 +1,74 @@
{
"Mappings": [{
"StartTime": 18500,
"Objects": [{
"StartTime": 18500,
"Position": 65
},
{
"StartTime": 18559,
"Position": 459
},
{
"StartTime": 18618,
"Position": 255
},
{
"StartTime": 18678,
"Position": 113
},
{
"StartTime": 18737,
"Position": 315
},
{
"StartTime": 18796,
"Position": 17
},
{
"StartTime": 18856,
"Position": 482
},
{
"StartTime": 18915,
"Position": 44
},
{
"StartTime": 18975,
"Position": 310
},
{
"StartTime": 19034,
"Position": 244
},
{
"StartTime": 19093,
"Position": 18
},
{
"StartTime": 19153,
"Position": 482
},
{
"StartTime": 19212,
"Position": 243
},
{
"StartTime": 19271,
"Position": 332
},
{
"StartTime": 19331,
"Position": 477
},
{
"StartTime": 19390,
"Position": 376
},
{
"StartTime": 19450,
"Position": 104
}
]
}]
}

View File

@ -0,0 +1,20 @@
osu file format v14
[General]
Mode: 2
[Difficulty]
HPDrainRate:6
CircleSize:4
OverallDifficulty:7
ApproachRate:8.3
SliderMultiplier:1.6
SliderTickRate:1
[TimingPoints]
500,500,4,2,1,50,1,0
13426,-100,4,3,1,45,0,0
14884,-100,4,2,1,50,0,0
[HitObjects]
256,192,18500,12,0,19450,0:0:0:0: