From bebf4fe722cf3be6d6092f0fa984d12909719dc0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 2 Sep 2024 02:33:58 -0700 Subject: [PATCH] DB infinite velocity and ammo fix --- Projectiles/Ranged/DragonsBreathFlames.cs | 4 ++-- Projectiles/Ranged/DragonsBreathHoldout.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Ranged/DragonsBreathFlames.cs b/Projectiles/Ranged/DragonsBreathFlames.cs index 0b8e129779..f63e16509d 100644 --- a/Projectiles/Ranged/DragonsBreathFlames.cs +++ b/Projectiles/Ranged/DragonsBreathFlames.cs @@ -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 { diff --git a/Projectiles/Ranged/DragonsBreathHoldout.cs b/Projectiles/Ranged/DragonsBreathHoldout.cs index ae3757ae38..f07662d2ac 100644 --- a/Projectiles/Ranged/DragonsBreathHoldout.cs +++ b/Projectiles/Ranged/DragonsBreathHoldout.cs @@ -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(), damage, knockback, Projectile.owner);