DB infinite velocity and ammo fix

This commit is contained in:
Xyk committed 2024-09-02 02:33:58 -07:00
1 parent 44a2b8fa48
commit bebf4fe722
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -50,7 +50,6 @@ namespace CalamityMod.Projectiles.Ranged
}
Player Owner = Main.player[Projectile.owner];
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen
float sine = MathHelper.Clamp(Math.Abs((float)Math.Sin((Time + Projectile.ai[1]) * 0.575f / MathHelper.Pi)), 0.6f + Time * 0.0015f, 1);
beamWidth = sine;
//Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * 22.5f;
@@ -99,7 +98,8 @@ namespace CalamityMod.Projectiles.Ranged
Particle beam33 = new CustomSpark(Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitX), "CalamityMod/Particles/SmallBloom", false, 10, 0.04f + Time * 0.0015f, Color.Lerp(Color.Orange, Color.White, 0.25f) * 0.5f, new Vector2(1f, 1), true, false, 0, false, false, 0.5f);
GeneralParticleHandler.SpawnParticle(beam33);
}
Projectile.velocity *= 1.01f;
if (Time < 120)
Projectile.velocity *= 1.01f;
}
if (Projectile.ai[0] == 1) //Welding Mode
{
+1 -1
View File
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged
// If the time reaches Item.useTime, it'll shoot the projectile, fire and reset the timer.
if (fireTimer >= Owner.itemTimeMax && Main.myPlayer == Projectile.owner)
{
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextBool(10));
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, !Main.rand.NextBool(5));
for (int i = 0; i < 3; i++)
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.15f * i * 0.5f) * shootSpeed * (i == 0 ? 0.5f : i == 1 ? 0.7f : 1) * Main.rand.NextFloat(0.8f, 1f), ModContent.ProjectileType<DragonsBreathFlames>(), damage, knockback, Projectile.owner);