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

37550 Commits

Author SHA1 Message Date
Naxess
7b684339ed Undo public -> internal for PathControlPoint.Changed
No longer used.
2021-03-31 20:32:49 +02:00
Naxess
5022a78e80 Check current point instead of start point
Since each control point will call this when the path updates, the previous would correct the start segment 3 times instead of just once.

This fixes that.
2021-03-31 20:25:46 +02:00
Naxess
75b8f2535f Move updatePathTypes to PathControlPointPiece
Here we produce a local bound copy of the path version, and bind it to update the path type.

This way, if the path version updates (i.e. any control point changes type or position), we check that all control points have a well-defined path.

Additionally, if the control point piece is disposed of, the GB should also swoop up the subscription because of the local bound copy.
2021-03-31 20:09:56 +02:00
Naxess
1718084dbc Update/remove determinant tests
We now only change the path type based on the bounding box.

If the control points are too linear, the framework now handles the fallback to Bezier.
2021-03-31 20:08:39 +02:00
Naxess
70d5b616f2 Add scaling path type recovery 2021-03-29 15:49:49 +02:00
Naxess
51f0477df4 Move bounding box logic to framework 2021-03-26 04:42:46 +01:00
Naxess
ce9130ca50 Remove determinant limit
This has since been added into the framework through https://github.com/ppy/osu-framework/pull/4302
2021-03-25 17:38:55 +01:00
Naxess
9df059b01d Add bounding box limit 2021-03-24 17:25:28 +01:00
Naxess
0f4314c1d8 Add complete arc test
Ensures we can still make smaller circles properly.
2021-03-24 17:24:33 +01:00
Naxess
b4dc35f66b Update large arc tests
Should now be more robust and readable.
2021-03-24 17:24:05 +01:00
Naxess
415797aadd Fix broken control point drag test
Broken for 2 reasons:
- Assert checks the wrong control point.
- The exterior arc is now too big.

This fixes both.
2021-03-24 06:01:12 +01:00
Naxess
e0240ab9d9 Increase exterior threshold 2021-03-24 05:55:34 +01:00
Naxess
f80b3ada25 Add circular arc size tests 2021-03-24 05:54:48 +01:00
Naxess
7b395ed783 Add exterior arc test 2021-03-24 05:15:50 +01:00
Naxess
23a4d1c135 Shorten recovery test name 2021-03-24 05:15:28 +01:00
Naxess
6fbe530016 Fix coordinates 2021-03-24 05:14:35 +01:00
Naxess
847d44c7d9 Remove unnecessary length asserts
We don't actually care about the length (as this isn't what we're testing), just the type of the slider.
2021-03-24 05:13:37 +01:00
Naxess
7bae4ff43d Add control point dragging tests 2021-03-24 05:06:04 +01:00
Naxess
4ae3eaaac6 Move path type correction
This is better because `PathControlPointVisualizer` is local to the editor, meaning there is no chance that this could affect gameplay.
2021-03-24 03:02:19 +01:00
Naxess
0bcd38e661 Simplify path type maintenance when dragging 2021-03-24 02:57:47 +01:00
Naxess
5ee280f941 Update PointsInSegment when adding/removing points
There was a bug where if you created a slider, moved the last point, and then added a point such that it became a PerfectCurve, it would fail to recover after becoming a Bezier.

This fixes that.
2021-03-24 02:56:32 +01:00
Naxess
e922e67c98 Fix inverted return statement
Forgot to run tests, all passing now.
2021-03-22 19:48:21 +01:00
Naxess
3fa5852e00 Add method documentation 2021-03-22 19:42:27 +01:00
Naxess
b11fd7972a Separate condition logic from math logic 2021-03-22 19:41:48 +01:00
Naxess
92f713a30e Improve fallback conditions
It's possible to create a `PerfectCurve` type path with more than 3 points currently, so this accounts for that.
2021-03-22 19:10:56 +01:00
Naxess
80e7c3aba7 Invert if statement 2021-03-22 19:09:28 +01:00
Naxess
6911a1b415 Fix missing newline 2021-03-22 19:03:55 +01:00
Naxess
a7076c329c Fix null checks 2021-03-22 17:32:55 +01:00
Naxess
323b875cea Fix newlines/spaces 2021-03-22 17:32:40 +01:00
Naxess
15af57de95 Add path type recovery test 2021-03-22 15:59:59 +01:00
Naxess
3bddc4a75d Add path type test 2021-03-22 15:59:45 +01:00
Naxess
067178e537 Maintain path type when dragging/placing 2021-03-22 15:59:06 +01:00
Naxess
c82218627f Add path type update logic
Only attempts to change points to bezier if points in the slider are modified.
2021-03-22 15:57:57 +01:00
Naxess
7a2cb526e4 Add PointsInSegment method 2021-03-22 15:55:30 +01:00
Naxess
bee2f55d00 Undo subpath limiting 2021-03-22 15:54:33 +01:00
Naxess
fcd1f4930f Fix freeze due to large circular arc radius
Seems to stem from the osu!framework's PathApproximator not catching a few edge cases wherein the radius approaches infinity.
2021-03-21 06:34:55 +01:00
Naxess
a294f328fb Add linear circular arc test 2021-03-21 06:30:17 +01:00
Dean Herbert
0bb6fbdd38
Merge pull request #12100 from bdach/invalid-thread-mutation-tablet
Fix transform mutations from invalid thread on tablet disconnection/reconnection
2021-03-20 21:30:12 +09:00
Bartłomiej Dach
86b569f5f7 Fix typo in identifier 2021-03-20 12:37:51 +01:00
Bartłomiej Dach
d28bed6ed2 Schedule adding transforms on tablet changes
Fixes `InvalidThreadForMutationException`s that pop up when
disconnecting/reconnecting tablets during the game's operation. In those
cases the value change callback executes from  an OpenTabletDriver
thread.
2021-03-20 12:37:48 +01:00
Dean Herbert
b9b351311a
Merge pull request #11824 from peppy/fix-unsafe-skinnable-sample-play
Fix playing skinned samples being unsafe during skin changes
2021-03-20 11:29:34 +09:00
Dean Herbert
ca943a897a Fix back to front initialisation order 2021-03-20 10:51:58 +09:00
Dean Herbert
e630c1be50
Merge pull request #12090 from bdach/overlapping-object-selection
Fix selection blueprint misbehaving with overlapping objects
2021-03-20 10:46:29 +09:00
Bartłomiej Dach
dd48b68f8a Ensure selected blueprints are given selection priority 2021-03-19 22:44:33 +01:00
Bartłomiej Dach
8e0536e1e2 Add failing test scene 2021-03-19 22:44:33 +01:00
Bartłomiej Dach
e67c759eef Mark control point visualiser as possibly-null 2021-03-19 22:44:31 +01:00
Bartłomiej Dach
9634560d4b Fix control point visualiser crashing after deselections
`SliderSelectionBlueprint.OnDeselected()` would expire the
`ControlPointVisualiser` on deselection, leading to its removal from the
blueprint and eventual disposal, but still kept a separate reference to
said visualiser in another field.

This could lead to that stale reference to a disposed child getting read
in `ReceivePositionalInputAt()`, crashing quite a ways down over at the
framework side on futilely trying to compute the bounding box of a
drawable with no parent.
2021-03-19 21:40:22 +01:00
Dan Balasescu
d54e9ab481
Merge pull request #12077 from peppy/tablet-configuration
Add tablet configuration section
2021-03-19 21:49:32 +09:00
Dan Balasescu
5a6ff53837
Merge pull request #12073 from peppy/fix-crash-toggle-overlay-before-loaded
Avoid potential crash if an overlay is toggled before it has been loaded
2021-03-19 21:38:47 +09:00
Dan Balasescu
e72205eea2
Merge pull request #12080 from peppy/add-25-playback-editor
Change editor speed adjust to adjust frequency (and restore 25% option)
2021-03-19 21:04:12 +09:00