Fixed NER recoil changing based on bullet velocity

This commit is contained in:
CongratsIsTrash committed 2024-06-17 11:43:49 -04:00
1 parent 715ab09455
commit 8fc70259e7
1 file changed
+3 -1
+3 -1
View File
@@ -65,7 +65,9 @@ namespace CalamityMod.Items.Weapons.Ranged
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.velocity += -velocity * 0.3f;
Vector2 recoilVelocity = velocity;
recoilVelocity.Normalize();
player.velocity += -recoilVelocity * 7f;
if (type == ProjectileID.Bullet)
type = ModContent.ProjectileType<NitroShot>();
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f);