mirror of
https://github.com/osukey/osukey.git
synced 2025-05-26 07:57:32 +09:00
Merge branch 'master' into download-tracking-component
This commit is contained in:
commit
befd40e545
@ -21,6 +21,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
[TestCase("basic")]
|
[TestCase("basic")]
|
||||||
[TestCase("spinner")]
|
[TestCase("spinner")]
|
||||||
[TestCase("spinner-and-circles")]
|
[TestCase("spinner-and-circles")]
|
||||||
|
[TestCase("slider")]
|
||||||
public new void Test(string name)
|
public new void Test(string name)
|
||||||
{
|
{
|
||||||
base.Test(name);
|
base.Test(name);
|
||||||
|
@ -55,6 +55,13 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
|
|
||||||
var minDistanceFromEnd = Velocity * 0.01;
|
var minDistanceFromEnd = Velocity * 0.01;
|
||||||
|
|
||||||
|
var tickSamples = Samples.Select(s => new SampleInfo
|
||||||
|
{
|
||||||
|
Bank = s.Bank,
|
||||||
|
Name = @"slidertick",
|
||||||
|
Volume = s.Volume
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
AddNested(new Fruit
|
AddNested(new Fruit
|
||||||
{
|
{
|
||||||
Samples = Samples,
|
Samples = Samples,
|
||||||
@ -62,15 +69,22 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
X = X
|
X = X
|
||||||
});
|
});
|
||||||
|
|
||||||
double lastDropletTime = StartTime;
|
double lastTickTime = StartTime;
|
||||||
|
|
||||||
for (int span = 0; span < this.SpanCount(); span++)
|
for (int span = 0; span < this.SpanCount(); span++)
|
||||||
{
|
{
|
||||||
var spanStartTime = StartTime + span * spanDuration;
|
var spanStartTime = StartTime + span * spanDuration;
|
||||||
var reversed = span % 2 == 1;
|
var reversed = span % 2 == 1;
|
||||||
|
|
||||||
for (double d = 0; d <= length; d += tickDistance)
|
for (double d = tickDistance;; d += tickDistance)
|
||||||
{
|
{
|
||||||
|
bool isLastTick = false;
|
||||||
|
if (d + minDistanceFromEnd >= length)
|
||||||
|
{
|
||||||
|
d = length;
|
||||||
|
isLastTick = true;
|
||||||
|
}
|
||||||
|
|
||||||
var timeProgress = d / length;
|
var timeProgress = d / length;
|
||||||
var distanceProgress = reversed ? 1 - timeProgress : timeProgress;
|
var distanceProgress = reversed ? 1 - timeProgress : timeProgress;
|
||||||
|
|
||||||
@ -79,47 +93,42 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
if (LegacyLastTickOffset != null)
|
if (LegacyLastTickOffset != null)
|
||||||
{
|
{
|
||||||
// If we're the last tick, apply the legacy offset
|
// If we're the last tick, apply the legacy offset
|
||||||
if (span == this.SpanCount() - 1 && d + tickDistance > length)
|
if (span == this.SpanCount() - 1 && isLastTick)
|
||||||
time = Math.Max(StartTime + Duration / 2, time - LegacyLastTickOffset.Value);
|
time = Math.Max(StartTime + Duration / 2, time - LegacyLastTickOffset.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double tinyTickInterval = time - lastDropletTime;
|
int tinyTickCount = 1;
|
||||||
while (tinyTickInterval > 100)
|
double tinyTickInterval = time - lastTickTime;
|
||||||
tinyTickInterval /= 2;
|
while (tinyTickInterval > 100 && tinyTickCount < 10000)
|
||||||
|
|
||||||
for (double t = lastDropletTime + tinyTickInterval; t < time; t += tinyTickInterval)
|
|
||||||
{
|
{
|
||||||
|
tinyTickInterval /= 2;
|
||||||
|
tinyTickCount *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int tinyTickIndex = 0; tinyTickIndex < tinyTickCount - 1; tinyTickIndex++)
|
||||||
|
{
|
||||||
|
var t = lastTickTime + (tinyTickIndex + 1) * tinyTickInterval;
|
||||||
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;
|
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;
|
||||||
|
|
||||||
AddNested(new TinyDroplet
|
AddNested(new TinyDroplet
|
||||||
{
|
{
|
||||||
StartTime = t,
|
StartTime = t,
|
||||||
X = X + Path.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH,
|
X = X + Path.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH,
|
||||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
Samples = tickSamples
|
||||||
{
|
|
||||||
Bank = s.Bank,
|
|
||||||
Name = @"slidertick",
|
|
||||||
Volume = s.Volume
|
|
||||||
}))
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d > minDistanceFromEnd && Math.Abs(d - length) > minDistanceFromEnd)
|
lastTickTime = time;
|
||||||
|
|
||||||
|
if (isLastTick)
|
||||||
|
break;
|
||||||
|
|
||||||
|
AddNested(new Droplet
|
||||||
{
|
{
|
||||||
AddNested(new Droplet
|
StartTime = time,
|
||||||
{
|
X = X + Path.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||||
StartTime = time,
|
Samples = tickSamples
|
||||||
X = X + Path.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH,
|
});
|
||||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
|
||||||
{
|
|
||||||
Bank = s.Bank,
|
|
||||||
Name = @"slidertick",
|
|
||||||
Volume = s.Volume
|
|
||||||
}))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
lastDropletTime = time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddNested(new Fruit
|
AddNested(new Fruit
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{"Mappings":[{"StartTime":19184.0,"Objects":[{"StartTime":19184.0,"Position":320.0},{"StartTime":19263.0,"Position":311.730255},{"StartTime":19343.0,"Position":324.6205},{"StartTime":19423.0,"Position":343.0907},{"StartTime":19503.0,"Position":372.2917},{"StartTime":19582.0,"Position":385.194733},{"StartTime":19662.0,"Position":379.0426},{"StartTime":19742.0,"Position":385.1066},{"StartTime":19822.0,"Position":391.624664},{"StartTime":19919.0,"Position":386.27832},{"StartTime":20016.0,"Position":380.117035},{"StartTime":20113.0,"Position":381.664154},{"StartTime":20247.0,"Position":370.872864}]}]}
|
@ -0,0 +1,18 @@
|
|||||||
|
osu file format v14
|
||||||
|
|
||||||
|
[General]
|
||||||
|
Mode: 2
|
||||||
|
|
||||||
|
[Difficulty]
|
||||||
|
HPDrainRate:3
|
||||||
|
CircleSize:2
|
||||||
|
OverallDifficulty:4
|
||||||
|
ApproachRate:4
|
||||||
|
SliderMultiplier:0.9
|
||||||
|
SliderTickRate:1
|
||||||
|
|
||||||
|
[TimingPoints]
|
||||||
|
35.4473684210527,638.298947368422,4,2,1,60,1,0
|
||||||
|
|
||||||
|
[HitObjects]
|
||||||
|
320,176,19184,2,8,P|384:168|368:232,1,150
|
Loading…
x
Reference in New Issue
Block a user