1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:23:20 +08:00

Compare commits

...

10 Commits

Author SHA1 Message Date
Dean Herbert
f25b1b33e3
Merge pull request #8461 from peppy/fix-minia-mod-replay-recording
Fix osu!mania replays recording incorrectly when key mod applied
2020-03-27 20:55:58 +09:00
Dan Balasescu
3763457a1d
Merge pull request #8451 from peppy/fix-slider-end-sounds
Only play slider end sounds if tracking
2020-03-27 20:38:59 +09:00
Dean Herbert
fdbffbd1db
Merge pull request #8452 from peppy/add-slider-judgement-accuracy
Make slider judgements count towards base score / accuracy
2020-03-27 20:37:26 +09:00
Dan Balasescu
5e1cb0e9e9
Merge branch 'master' into fix-minia-mod-replay-recording 2020-03-27 19:26:41 +09:00
Dan Balasescu
04b34791cd
Merge branch 'master' into add-slider-judgement-accuracy 2020-03-27 19:26:34 +09:00
Dan Balasescu
005a818f32
Merge branch 'master' into fix-slider-end-sounds 2020-03-27 19:26:32 +09:00
Dean Herbert
f75c082601 Fix osu!mania replays recording incorrectly when key mod applied 2020-03-27 15:50:11 +09:00
Dean Herbert
f80efd10c2 Avoid using a miss judgement 2020-03-26 19:54:17 +09:00
Dean Herbert
6555ab6ede Only play slider end sounds if tracking 2020-03-26 17:18:27 +09:00
Dean Herbert
8e4896fbbe Make slider judgements count towards base score / accuracy 2020-03-26 17:13:53 +09:00
7 changed files with 21 additions and 23 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Replays.Legacy;
using osu.Game.Rulesets.Mania.Beatmaps;
@ -26,13 +27,7 @@ namespace osu.Game.Rulesets.Mania.Replays
public void FromLegacy(LegacyReplayFrame legacyFrame, IBeatmap beatmap, ReplayFrame lastFrame = null)
{
// We don't need to fully convert, just create the converter
var converter = new ManiaBeatmapConverter(beatmap, new ManiaRuleset());
// NB: Via co-op mod, osu-stable can have two stages with floor(col/2) and ceil(col/2) columns. This will need special handling
// elsewhere in the game if we do choose to support the old co-op mod anyway. For now, assume that there is only one stage.
var stage = new StageDefinition { Columns = converter.TargetColumns };
var maniaBeatmap = (ManiaBeatmap)beatmap;
var normalAction = ManiaAction.Key1;
var specialAction = ManiaAction.Special1;
@ -42,7 +37,7 @@ namespace osu.Game.Rulesets.Mania.Replays
while (activeColumns > 0)
{
var isSpecial = stage.IsSpecialColumn(counter);
var isSpecial = maniaBeatmap.Stages.First().IsSpecialColumn(counter);
if ((activeColumns & 1) > 0)
Actions.Add(isSpecial ? specialAction : normalAction);
@ -59,17 +54,15 @@ namespace osu.Game.Rulesets.Mania.Replays
public LegacyReplayFrame ToLegacy(IBeatmap beatmap)
{
var maniaBeatmap = (ManiaBeatmap)beatmap;
int keys = 0;
var converter = new ManiaBeatmapConverter(beatmap, new ManiaRuleset());
var stage = new StageDefinition { Columns = converter.TargetColumns };
var specialColumns = new List<int>();
for (int i = 0; i < converter.TargetColumns; i++)
for (int i = 0; i < maniaBeatmap.TotalColumns; i++)
{
if (stage.IsSpecialColumn(i))
if (maniaBeatmap.Stages.First().IsSpecialColumn(i))
specialColumns.Add(i);
}

View File

@ -11,6 +11,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Skinning;
using osu.Game.Rulesets.Scoring;
using osuTK.Graphics;
using osu.Game.Skinning;
@ -196,6 +197,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
ApplyResult(r => r.Type = r.Judgement.MaxResult);
}
public override void PlaySamples()
{
// rather than doing it this way, we should probably attach the sample to the tail circle.
// this can only be done after we stop using LegacyLastTick.
if (TailCircle.Result.Type != HitResult.Miss)
base.PlaySamples();
}
protected override void UpdateStateTransforms(ArmedState state)
{
base.UpdateStateTransforms(state);

View File

@ -34,8 +34,6 @@ namespace osu.Game.Rulesets.Osu.Objects
public class SliderRepeatJudgement : OsuJudgement
{
public override bool IsBonus => true;
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 30 : 0;
}
}

View File

@ -36,8 +36,6 @@ namespace osu.Game.Rulesets.Osu.Objects
public class SliderTickJudgement : OsuJudgement
{
public override bool IsBonus => true;
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 10 : 0;
}
}

View File

@ -344,7 +344,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
/// This is invoked automatically when this <see cref="DrawableHitObject"/> is hit.
/// </summary>
public void PlaySamples() => Samples?.Play();
public virtual void PlaySamples() => Samples?.Play();
protected override void Update()
{

View File

@ -45,9 +45,6 @@ namespace osu.Game.Scoring.Legacy
if (workingBeatmap is DummyWorkingBeatmap)
throw new BeatmapNotFoundException();
currentBeatmap = workingBeatmap.Beatmap;
scoreInfo.Beatmap = currentBeatmap.BeatmapInfo;
scoreInfo.User = new User { Username = sr.ReadString() };
// MD5Hash
@ -68,6 +65,9 @@ namespace osu.Game.Scoring.Legacy
scoreInfo.Mods = currentRuleset.ConvertFromLegacyMods((LegacyMods)sr.ReadInt32()).ToArray();
currentBeatmap = workingBeatmap.GetPlayableBeatmap(currentRuleset.RulesetInfo, scoreInfo.Mods);
scoreInfo.Beatmap = currentBeatmap.BeatmapInfo;
/* score.HpGraphString = */
sr.ReadString();

View File

@ -665,7 +665,7 @@ namespace osu.Game.Screens.Play
using (var stream = new MemoryStream())
{
new LegacyScoreEncoder(score, gameplayBeatmap).Encode(stream);
new LegacyScoreEncoder(score, gameplayBeatmap.PlayableBeatmap).Encode(stream);
replayReader = new LegacyByteArrayReader(stream.ToArray(), "replay.osr");
}
}