Skip to content

Fix the bug that every first shot of The Sevens Striker get Bust - #119

Open
Niratude wants to merge 1 commit into
CalamityTeam:1.4.4from
Niratude:AboutTheSevensStriker
Open

Fix the bug that every first shot of The Sevens Striker get Bust#119
Niratude wants to merge 1 commit into
CalamityTeam:1.4.4from
Niratude:AboutTheSevensStriker

Conversation

@Niratude

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant