-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
Rigidity slider fix #5778
Rigidity slider fix #5778
Conversation
The lead programmer for Thrive is currently on vacation until 2025-01-07. Until then other programmers will try to make pull request reviews, but please be patient if your PR is not getting reviewed. PRs may be merged after multiple programmers have approved the changes (especially making sure to ensure style guide conformance and gameplay testing are good). If there are no active experienced programmers who can perform merges, PRs may need to wait until the lead programmer is back to be merged. |
I have found a new corner case:
It seems like the issue is that the step cutoff calculations don't take into account the extra 1 that may be added due to rounding |
I think this corner case is working properly now |
I have found another corner case:
|
I took care of it as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only issue I could find now is that when choosing rigidity though clicking while having low enough MP, there might be more steps cut off than needed.
For example, with the MP cost modifier of 1.9:
- Switch to any membrane type
- Move rigidity one step left
- Click somewhere on the right part of the slider
The slider's value would then be one step away from the right value due to excessive cut off
Well that seems like a really rare case and not that problematic. I think that in order to cover this one I would actually need to rewrite the whole function from scratch because I don't see any other solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the primary bug but as @dligr found out this leaves 1 or 2 MP when trying to move too far in one step, which is a pretty noticeable bug when playing with the slider.
As this has been open for a while and fixes the game locking up, I'll merge this but open a follow up issue.
Opened the new issue: #5821 |
Brief Description of What This PR Does
Hopefully this fixes the rigidity slider issue. The problem was mainly with the division by 0.
Related Issues
Closes #4150
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR)
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.