From f2ca3554fd299abd273a2a5381a86ece399c8430 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 7 Feb 2026 16:56:34 -0500 Subject: [PATCH] God Slayer Slug Flashbang Fix Now manually draws the three dust lines equally spaced out instead of using CloneDust. Is the lesson here to not use CloneDust in high quantities? I'm not sure honestly! --- Projectiles/Ranged/GodSlayerSlugProj.cs | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Projectiles/Ranged/GodSlayerSlugProj.cs b/Projectiles/Ranged/GodSlayerSlugProj.cs index 3f492ffb36..d55f94733f 100644 --- a/Projectiles/Ranged/GodSlayerSlugProj.cs +++ b/Projectiles/Ranged/GodSlayerSlugProj.cs @@ -8,6 +8,7 @@ using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; +using System.Linq; namespace CalamityMod.Projectiles.Ranged { @@ -182,20 +183,25 @@ namespace CalamityMod.Projectiles.Ranged int dustID = ModContent.DustType(); int numDust = 9; float triangleAngle = Main.rand.NextFloat(MathHelper.TwoPi); - for (int i = 0; i < numDust; ++i) + for (int j = 0; j < 3; ++j) { - float lerp = i / (float)(numDust - 1); - float speed = MathHelper.Lerp(0.2f, 3.6f, lerp); - Vector2 dustVel = Vector2.UnitX.RotatedBy(triangleAngle) * speed * 2; - Dust d = Dust.NewDustDirect(Projectile.Center, 0, 0, dustID); - d.position = Projectile.Center; - d.velocity = dustVel; - d.noGravity = true; - d.fadeIn = 1.5f; - d.scale *= Main.rand.NextFloat(1.4f, 1.9f) - lerp * 0.5f; - d.color = Color.Lerp(Color.Cyan, Color.Magenta, lerp); - Dust.CloneDust(d).velocity = dustVel.RotatedBy(MathHelper.Pi * 2f / 3f); - Dust.CloneDust(d).velocity = dustVel.RotatedBy(MathHelper.Pi * 4f / 3f); + float angleOffset = MathHelper.TwoPi / 3f * j; + float currentAngle = triangleAngle + angleOffset; + + for (int i = 0; i < numDust; ++i) + { + float lerp = i / (float)(numDust - 1); + float speed = MathHelper.Lerp(0.2f, 3.6f, lerp); + + Vector2 dustVel = Vector2.UnitX.RotatedBy(currentAngle) * speed * 2f; + Dust d = Dust.NewDustDirect(Projectile.Center, 0, 0, dustID); + d.position = Projectile.Center; + d.velocity = dustVel; + d.noGravity = true; + d.fadeIn = 1.5f; + d.scale *= Main.rand.NextFloat(1.4f, 1.9f) - lerp * 0.5f; + d.color = Color.Lerp(Color.Cyan, Color.Magenta, lerp); + } } }