From ad9fed147aaa7adeafe28cf0b799d98c542c989a Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:12:59 +0700 Subject: [PATCH] Apollo charge telegraph fix + Changed Artemis' trail points to the bare minimum required (5) --- Projectiles/Boss/ApolloChargeTelegraph.cs | 9 ++++----- Projectiles/Boss/ArtemisChargeTelegraph.cs | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Projectiles/Boss/ApolloChargeTelegraph.cs b/Projectiles/Boss/ApolloChargeTelegraph.cs index 66e6f36cc1..143df6a6d3 100644 --- a/Projectiles/Boss/ApolloChargeTelegraph.cs +++ b/Projectiles/Boss/ApolloChargeTelegraph.cs @@ -118,11 +118,10 @@ namespace CalamityMod.Projectiles.Boss for (int i = ChargePositions.Length - 2; i >= 0; i--) { - Vector2[] positions = new Vector2[2] - { - ChargePositions[i], - ChargePositions[i + 1] - }; + // This is effectively a 2-point trail that is extended as Toasty's new Primitive system appears to no longer support them. + Vector2[] positions = new Vector2[5]; + for (int p = 0; p < positions.Length; p++) + positions[p] = Vector2.Lerp(ChargePositions[i], ChargePositions[i + 1], p / (positions.Length - 1f)); // Stand-in variable used to differentiate between the beams. // It is not used anywhere else. diff --git a/Projectiles/Boss/ArtemisChargeTelegraph.cs b/Projectiles/Boss/ArtemisChargeTelegraph.cs index cfed44d8fb..6b3648880b 100644 --- a/Projectiles/Boss/ArtemisChargeTelegraph.cs +++ b/Projectiles/Boss/ArtemisChargeTelegraph.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Boss GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.28f); // This is effectively a 2-point trail that is extended as Toasty's new Primitive system appears to no longer support them. - Vector2[] drawPositions = new Vector2[6]; + Vector2[] drawPositions = new Vector2[5]; for (int i = 0; i < drawPositions.Length; i++) drawPositions[i] = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * TelegraphWidth * i / (drawPositions.Length - 1f);