1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-02 04:32:56 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Edit/Blueprints
Bartłomiej Dach 18f1d62182
Fix juice stream placement blueprint being initially visually offset
- Closes https://github.com/ppy/osu/issues/31423.
- Regressed in https://github.com/ppy/osu/pull/30411.

Admittedly, I don't completely understand all of the pieces here,
because code quality of this placement blueprint code is ALL-CAPS
ATROCIOUS, but I believe the failure mode to be something along the
lines of:

- User activates juice stream tool, blueprint gets created in initial
  state. It reads in a mouse position far outside of the playfield, and
  sets internal positioning appropriately.
- When the user moves the mouse into the bounds of the playfield, some
  positions update (the ones inside `UpdateTimeAndPosition()`, but the
  fruit markers are for *nested* objects, and
  `updateHitObjectFromPath()` is responsible for updating those...
  however, it only fires if the `editablePath.PathId` changes, which it
  won't here, because there is only one path vertex until the user
  commits the starting point of the juice stream and it's always at
  (0,0).
- Therefore the position of the starting fruit marker remains bogus
  until left click, at which point the path changes and everything
  returns to *relative* sanity.

The solution essentially relies on inlining the broken method and only
guarding the relevant part of processing behind the path version check
(which is actually updating the path). Everything else that can touch
positions of nesteds (like default application, and the drawable piece
updates) is allowed to happen unconditionally.
2025-01-09 09:37:57 +01:00
..
Components Fix editing juice stream path sometimes changing its duration 2024-07-22 15:14:45 +02:00
BananaShowerPlacementBlueprint.cs fix near-zero length sliders n stuff being placeable 2023-12-19 21:20:21 +01:00
BananaShowerSelectionBlueprint.cs Remove #nullable disable from Catch.Edit namespace 2023-01-15 17:29:32 +09:00
CatchPlacementBlueprint.cs Refactor PlacementBlueprint to not be hitobject specific 2024-09-24 20:31:00 +02:00
CatchSelectionBlueprint.cs Remove #nullable disable from Catch.Edit namespace 2023-01-15 17:29:32 +09:00
FruitPlacementBlueprint.cs Remove #nullable disable from Catch.Edit namespace 2023-01-15 17:29:32 +09:00
FruitSelectionBlueprint.cs Remove #nullable disable from Catch.Edit namespace 2023-01-15 17:29:32 +09:00
JuiceStreamPlacementBlueprint.cs Fix juice stream placement blueprint being initially visually offset 2025-01-09 09:37:57 +01:00
JuiceStreamSelectionBlueprint.cs Add comments backreferences to copies of duplicated code for future use 2024-12-11 16:26:11 +09:00