mirror of
https://github.com/ppy/osu.git
synced 2026-05-16 17:03:01 +08:00
12cc8e38da
Closes https://github.com/ppy/osu/issues/33465 probably. This reverts the replay frame de-duplication logic to what it was before https://github.com/ppy/osu/pull/33148#discussion_r2091549388. I don't have good reproduction steps. I tried to write a test case for this that isn't just "press and release a key in the same frame", thinking that maybe there was some loophole in the osu! touch input mapper that may produce this situation artificially, but I could not in many configurations. So I have to assume that this just *can happen* organically.
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using MessagePack;
|
|
using osu.Game.Online.Spectator;
|
|
|
|
namespace osu.Game.Rulesets.Replays
|
|
{
|
|
[MessagePackObject]
|
|
public class ReplayFrame
|
|
{
|
|
/// <summary>
|
|
/// The time at which this <see cref="ReplayFrame"/> takes place.
|
|
/// </summary>
|
|
[Key(0)]
|
|
public double Time;
|
|
|
|
/// <summary>
|
|
/// A <see cref="FrameHeader"/> containing the state of a play after this <see cref="ReplayFrame"/> takes place.
|
|
/// May be omitted where exact per-frame accuracy is not required.
|
|
/// </summary>
|
|
[IgnoreMember]
|
|
public FrameHeader? Header;
|
|
|
|
public ReplayFrame()
|
|
{
|
|
}
|
|
|
|
public ReplayFrame(double time)
|
|
{
|
|
Time = time;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Whether this frame is equivalent to <paramref name="other"/> with respect to replay recording.
|
|
/// </summary>
|
|
public virtual bool IsEquivalentTo(ReplayFrame other) => Time == other.Time;
|
|
}
|
|
}
|