diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3dcbe21eab..bfad7730dd 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1345,19 +1345,31 @@ namespace CalamityMod.CalPlayer } } - // Hydrothermal blue smoke effects but it doesn't work epicccccc if (Player.whoAmI == Main.myPlayer) { - if (hydrothermalSmoke) + if (hydrothermalSmoke && !Main.dedServ) { + // Release effects when the player moves. if (Math.Abs(Player.velocity.X) > 0.1f || Math.Abs(Player.velocity.Y) > 0.1f) { - // https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list - var source = Player.GetSource_FromThis(HydrothermicArmor.VanitySmokeEntitySourceContext); - Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + if (Main.rand.NextBool(6)) + { + int fieryDust = Dust.NewDust(Player.Top + Vector2.UnitY, 20, 42, DustID.Flare, 0f, 0f, 100, default, 0.7f); + if (Main.rand.NextBool(4)) + { + Main.dust[fieryDust].scale *= 0.35f; + } + Main.dust[fieryDust].velocity *= 0f; + } + + if (Main.rand.NextBool(2)) + { + float upwardVariation = Main.rand.NextFloat(-4.5f, -8f); + MediumMistParticle mist = new MediumMistParticle(Player.Top + Vector2.UnitY, -Player.velocity + new Vector2(0.5f, upwardVariation), Main.rand.NextBool(3) ? Color.LightSteelBlue : Color.Black, Color.Black, Main.rand.NextFloat(0.4f, 0.65f), 130); + GeneralParticleHandler.SpawnParticle(mist); + } } } - // Trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working if (!Player.armorEffectDrawOutlines) { hydrothermalSmoke = false; diff --git a/Projectiles/Typeless/HydrothermalSmoke.cs b/Projectiles/Typeless/HydrothermalSmoke.cs deleted file mode 100644 index 1fda4b4a77..0000000000 --- a/Projectiles/Typeless/HydrothermalSmoke.cs +++ /dev/null @@ -1,54 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class HydrothermalSmoke : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - - public override void SetDefaults() - { - Projectile.width = 20; - Projectile.height = 42; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 6; - } - - public override void AI() - { - - if (Projectile.timeLeft == 6) - Projectile.Center = Main.player[Projectile.owner].Center; - - if (Main.rand.NextBool(6)) - { - int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 0.7f); - if (Main.rand.NextBool(4)) - { - Main.dust[fieryDust].scale *= 0.35f; - } - Main.dust[fieryDust].velocity *= 0f; - } - - - if (Main.rand.NextBool(9) && !Main.dedServ) - { - float upwardVariation = Main.rand.NextFloat(-4.5f, -8f); - MediumMistParticle mist = new MediumMistParticle(Projectile.position, -Projectile.velocity + new Vector2(0.5f, upwardVariation), // This velocity makes it slowly float upward - Main.rand.NextBool(3) ? Color.LightSteelBlue : Color.SteelBlue, Color.LightSlateGray, Main.rand.NextFloat(0.4f, 0.65f), 130); - GeneralParticleHandler.SpawnParticle(mist); - } - } - - public override bool? CanDamage() => false; - } -}