-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 Speedloader Partial Reload #32396
Open
Rainbeon
wants to merge
1
commit into
space-wizards:master
Choose a base branch
from
Rainbeon:FixRevolverSpeedloaders
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Doesn't that entirely duplicate lines 171-193 at this point.
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.
For the most part they are very similar but lines 171-193 will not run if the Speedloader Component is present, and vice versa. 171-193 only loads a single bullet and is an alternative to lines 107-168, though its method for finding where to put those bullets is correct, unlike Speedloader's current method. They attempt to do similar things, but Speedloader's version doesn't function correctly because it both looks in the incorrect direction, and it doesn't actually look through the entire cylinder, leading to it just despawning bullets without loading any of them, or putting them in bad places.
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.
Furthermore what 133-158 is doing is looking through every slot from the initial position in an attempt to load multiple rounds from a container (the Speedloader), and breaking when it runs out of ammo. It grabs round types of the speedloader (which can be mixed types) and takes it out of the speedloader. It finishes after this loop is ran.
What 171-193 is doing is looking through every slot from the initial position to insert a single round from the hand and then instantly finishing inside the same loop.
They each handle a different case and don't run in parallel, not code dupe, and the loop would need to be the same regardless. These HAVE to be split and have the same For Loop definition. The only actual duping is the end sequence (outside of this loop) where it plays the sound, updates the appearances, and then dirties the comp, which is not part of this.