1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:52:56 +08:00

Fix unit test regression.

This commit is contained in:
Dean Herbert 2016-12-08 20:00:24 +09:00
parent 391767e01d
commit c53743ca7d
2 changed files with 5 additions and 2 deletions

View File

@ -102,7 +102,7 @@ namespace osu.Game.Modes.Osu.Objects
result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
result.StartTime = double.Parse(split[2]);
result.Sample = new HitSampleInfo {
Type = (SampleType)Math.Max(1, int.Parse(split[4])),
Type = (SampleType)int.Parse(split[4]),
Set = SampleSet.Soft,
};
result.NewCombo = combo;

View File

@ -55,7 +55,10 @@ namespace osu.Game.Modes.Objects.Drawables
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
sample = audio.Sample.Get($@"Gameplay/{(HitObject.Sample.Set).ToString().ToLower()}-hit{HitObject.Sample.Type.ToString().ToLower()}");
string hitType = (HitObject.Sample.Type == SampleType.None ? SampleType.Normal : HitObject.Sample.Type).ToString().ToLower();
string sampleSet = HitObject.Sample.Set.ToString().ToLower();
sample = audio.Sample.Get($@"Gameplay/{sampleSet}-hit{hitType}");
}
protected void PlaySample()