1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:37:42 +08:00
Commit Graph

73 Commits

Author SHA1 Message Date
Dan Balasescu
0458d408bb Add replay statistics frames to FramedReplayInputHandler 2022-01-31 18:53:47 +09:00
Dan Balasescu
4727aeda01 Give last bundled replay frame the frame header 2022-01-31 18:53:47 +09:00
Dean Herbert
9495f87f04 Remove redundant NotNull attributes in nullable classes 2021-06-17 16:07:32 +09:00
ekrctb
111b501ced Revert accidental removal of UTF-8 BOM 2021-05-07 18:04:38 +09:00
ekrctb
207f7f1e56 Rename FramedAutoGenerator<T> -> AutoGenerator<T> 2021-05-07 00:31:12 +09:00
ekrctb
ea35b72436 Remove unused IAutoGenerator interface 2021-05-06 22:57:07 +09:00
ekrctb
9be36230f9 Introduce AutoGenerator subclass for frame based replay generation 2021-05-06 21:59:11 +09:00
Salman Ahmed
943c497397 Return back removed using 2021-05-03 02:02:14 +03:00
Salman Ahmed
b2130fc600 Fix replay frames sort instability 2021-05-03 01:58:44 +03:00
ekrctb
91c7d8d26c Introduce StartFrame and EndFrame to simplify the replay interpolation code 2021-04-16 14:13:41 +09:00
ekrctb
84bc81a6de Make FramedReplayInputHandler.CurrentTime non-null 2021-04-16 14:13:41 +09:00
Dean Herbert
5eaf3ea576 Reorganise and reword comments to make time override behaviour a bit clearer 2021-04-15 14:19:06 +09:00
ekrctb
57ba7b7cbb Partially revert the changes of CurrentFrame and NextFrame for compatibility
Making those always non-null is postponed as when a replay's frame contains keypress the behavior is changed.
Previously, the key is pressed at the time of the first frame. But using non-null frames means the key is pressed at negative infinity.
However, I think the new way of always using non-null frames makes the client code so I plan to bundle the change to more breaking changes.
2021-04-13 15:55:23 +09:00
ekrctb
31d3607105 Add TODO comment 2021-04-12 18:54:36 +09:00
ekrctb
359fae895f Rename property 2021-04-12 18:50:25 +09:00
ekrctb
f1b8171e38 Remove #nullable true for now to suppress inspector 2021-04-12 17:13:48 +09:00
ekrctb
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
ekrctb
d6d8ea5b6b Throw when getting a frame of an empty replay 2021-04-12 11:17:56 +09:00
Dean Herbert
9537090d28 Setup all spectator model classes for MessagePack 2021-01-26 16:39:35 +09:00
Dan Balasescu
04178e9458
Merge branch 'master' into spectator-replay-watcher 2020-11-02 14:54:51 +09:00
Bartłomiej Dach
2b0bea535e Resolve CA1805 inspections
"Member is explicitly initialized to its default value"
2020-11-01 18:47:40 +01:00
Dean Herbert
32e68a6a3c Fix FramedReplayInputHandler incorrectly blocking in streaming mode when time requested is before the first frame
Most of this is just tidying up the logic to (hopefully) be better to
follow, again (again (again)).

The actual fix is that we now allow interpolation/playback when the
incoming time is less than the first frame's time, regardless of
receiving status.
2020-10-30 16:09:03 +09:00
Dean Herbert
6eddd76bdc Simplify FramedReplayInputHandler's SetFrame implementation 2020-10-28 16:03:23 +09:00
Dean Herbert
3e5322541d Make direction setting more clear 2020-10-28 14:35:42 +09:00
Dean Herbert
b3d793a505 Fix gameplay proceeding when no frames have been received yet 2020-10-27 18:58:37 +09:00
Dean Herbert
9e6b0a42ec Allow FrameStabilityContainer to handle waiting-for-data state better (and pause outwards) 2020-10-27 18:58:37 +09:00
Dean Herbert
400542bc0b Ensure frames arrive 2020-10-27 18:58:37 +09:00
Dean Herbert
648e414c14 Update InputHandlers in line with framework changes 2020-07-19 11:39:11 +09:00
alex
0e2ccac33b Add spaces to comments 2020-05-04 18:36:24 -07:00
Dean Herbert
8a2aac5f83 Rename conversion methods for clarity 2020-03-25 20:21:34 +09:00
Dean Herbert
022465f546 Add encoding and import support 2020-03-24 14:51:52 +09:00
Dean Herbert
61a7f04efb Add a sane key up delay to relax mod 2020-02-14 17:13:50 +09:00
Berkan Diler
6cab517b2d .NET Standard 2.1 implements Math.Clamp , use it instead of MathHelper.Clamp from osuTK. 2019-11-20 13:37:47 +01:00
Dean Herbert
624e5644a4 Change osu!catch key trigger to occur on frame before positional change 2019-09-13 23:06:35 +09:00
Dean Herbert
acdfeef1dc Improve how osu!catch stores and replays key actions 2019-09-12 18:33:46 +09:00
Desconocidosmh
b3556403aa Make GetNextObject() a virtual method 2019-08-19 16:18:25 +02:00
Dean Herbert
80ddfc3b1e Disable frame accurate replay playback
I want to prioritise better playback performance over accuracy for now. Also, in my testing this is still 100% accurate due to the addition of the FrameStabilityContainer, which is pretty cool.
2019-07-10 10:27:51 +09:00
Dean Herbert
d1a175675d Use variable 2019-04-01 10:37:02 +09:00
Dean Herbert
5d91c3bcfc Fix replay handler nullref crashes 2019-03-31 01:33:56 +09:00
Dean Herbert
e7b38cdc75 Remove unnecessary set 2019-03-29 12:38:47 +09:00
Dean Herbert
5b0aa7bf8d Split out current/next frame conditionals for readability 2019-03-29 12:38:40 +09:00
Dean Herbert
70f99400ad Fix many behavioural issues and add tests 2019-03-28 19:28:13 +09:00
Dean Herbert
148e26a6d4 Fix FramedReplayInputHandler starting at frame 0 when it shouldn't 2019-03-28 12:42:57 +09:00
Dean Herbert
1f44dde96b Fix autoplay tests not working 2019-03-07 18:34:56 +09:00
Dean Herbert
26d53d06a9 Fix remaining issues 2019-02-28 13:31:40 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
smoogipoo
2ee181daf7 Re-namespace replay-related classes 2018-11-28 17:20:37 +09:00
smoogipoo
f27bd3ef3e OpenTK -> osuTK 2018-11-20 17:14:59 +09:00
Dean Herbert
0f37758314 Update framework 2018-07-21 16:21:53 +09:00
Dean Herbert
dbc538abbe Use Enum.HasFlag
With .NET core 2.0+ this is as efficient as the ugly code we've been using.
2018-07-16 16:18:46 +09:00