Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix catch drawable objects not being clamped to playfield bounds #26158

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Dec 27, 2023

Addresses first issue mentioned in #26145

Can be tested using supplied test scene, and on https://osu.ppy.sh/beatmapsets/1062804#fruits/2234731 - see juice stream @ 01:58:172:

stable master this PR
screenshot017 osu_2023-12-27_11-13-49 osu_2023-12-27_11-13-06

Notably, only fruits and droplets are affected. Small droplets aren't affected, because of

catchObject.XOffset = Math.Clamp(rng.Next(-20, 20), -catchObject.OriginalX, CatchPlayfield.WIDTH - catchObject.OriginalX);

(the offset clamp ensures that OriginalXBindable.Value + XOffsetBindable.Value is always inside [0, 512]), and bananas aren't affected as

banana.XOffset = (float)(rng.NextDouble() * CatchPlayfield.WIDTH);

@bdach bdach added ruleset/osu!catch area:gameplay next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! labels Dec 27, 2023
@bdach bdach requested a review from a team December 27, 2023 10:20
@peppy peppy self-requested a review December 27, 2023 10:43
@peppy peppy merged commit b53e730 into ppy:master Dec 27, 2023
15 of 17 checks passed
@bdach bdach deleted the catch-clamping branch December 27, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:gameplay next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! ruleset/osu!catch size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants