Fix the bug that every first shot of The Sevens Striker get Bust - #119
Open
Niratude wants to merge 1 commit into
Open
Fix the bug that every first shot of The Sevens Striker get Bust#119Niratude wants to merge 1 commit into
Niratude wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
My friend told me that when he used The Sevens Striker, it would get bust even if a plantium coin was consumed. After testing, I found that every first shot of The Sevens Striker was bound to get bust, no matter what kind of coin was consumed. If the player holds down the mouse, all shots fired after the first shot will behave normally.
I compared the previous version and the current version of TheSevensStriker.cs.
Then I noticed that the projectile was created like this in the previous version:
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, type, 0f);
By contrast, the current version uses this to create the projectile:
Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI);
The current code omits the two parameters ' type ' and ' 0f '.
I tried adding these two arguments back and rebuilt the mod. After that, every first shot of The Sevens Striker worked correctly, firing the corresponding projectile based on the coins consumed.