From f9fd6d51d62f6f11dbfb8fa9583ec29818333c25 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 02:54:47 +0700 Subject: [PATCH 01/10] fixed remix empress going POOF and shit --- ILEditing/MechanicILChanges.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 81a209872d..e5207bc4e2 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -284,7 +284,7 @@ namespace CalamityMod.ILEditing #region Allow Empress to Enrage in Boss Rush private static bool AllowEmpressToEnrageInBossRush(Terraria.On_NPC.orig_ShouldEmpressBeEnraged orig) { - if (Main.dayTime || BossRushEvent.BossRushActive) + if (BossRushEvent.BossRushActive) return true; return orig(); From cb9666a4654384fda1d486011903d7434bb91917 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 04:11:21 +0700 Subject: [PATCH 02/10] other remix stuff - Empress debuffs will always be consistent with enrage status - CalClone and Astrum Deus can be summoned at all times - Other bosses have enrages matching remix night - Cryogen's auroras are now consistent throughout the remix night Note: most items remain the same because that's apparently how vanilla works --- CalPlayer/CalamityPlayerHitHurt.cs | 6 +++--- Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs | 4 ++-- Items/SummonItems/EyeofDesolation.cs | 2 +- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 5 +---- NPCs/AstrumAureus/AureusSpawn.cs | 6 +++--- NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs | 2 +- NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs | 2 +- NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs | 6 +++--- NPCs/CalamityGlobalNPC.cs | 4 ++-- NPCs/NormalNPCs/SkeletronPrime2.cs | 2 +- NPCs/Providence/Providence.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs | 4 ++-- NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 4 ++-- Projectiles/Boss/DyingSun.cs | 2 +- Projectiles/Boss/HolyAura.cs | 2 +- Projectiles/Boss/HolyExplosionBoom.cs | 2 +- Projectiles/Boss/SwirlingFire.cs | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 2 +- Skies/CryogenSky.cs | 2 +- Tiles/Astral/AstralBeacon.cs | 2 +- 24 files changed, 35 insertions(+), 38 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index f9a656c2b6..ee8fc6aeb3 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1383,15 +1383,15 @@ namespace CalamityMod.CalPlayer } else if (proj.type == ProjectileID.FairyQueenLance || proj.type == ProjectileID.HallowBossRainbowStreak || proj.type == ProjectileID.HallowBossSplitShotCore) { - Player.AddBuff(Main.dayTime ? ModContent.BuffType() : ModContent.BuffType(), 60); + Player.AddBuff(NPC.ShouldEmpressBeEnraged() ? ModContent.BuffType() : ModContent.BuffType(), 60); } else if (proj.type == ProjectileID.HallowBossLastingRainbow) { - Player.AddBuff(Main.dayTime ? ModContent.BuffType() : ModContent.BuffType(), 120); + Player.AddBuff(NPC.ShouldEmpressBeEnraged() ? ModContent.BuffType() : ModContent.BuffType(), 120); } else if (proj.type == ProjectileID.FairyQueenSunDance) { - Player.AddBuff(Main.dayTime ? ModContent.BuffType() : ModContent.BuffType(), 180); + Player.AddBuff(NPC.ShouldEmpressBeEnraged() ? ModContent.BuffType() : ModContent.BuffType(), 180); } else if (proj.type == ProjectileID.BloodNautilusShot) { diff --git a/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs b/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs index 7d6a59610e..239947daaa 100644 --- a/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs +++ b/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers } var shader = GameShaders.Misc["CalamityMod:HolyInfernoShader"].Shader; - shader.Parameters["colorMult"].SetValue(Main.dayTime ? 7.35f : 7.65f); //I want you to know it took considerable restraint to deliberately misspell colour. + shader.Parameters["colorMult"].SetValue(Main.IsItDay() ? 7.35f : 7.65f); //I want you to know it took considerable restraint to deliberately misspell colour. shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly); shader.Parameters["radius"].SetValue(borderDistance); shader.Parameters["anchorPoint"].SetValue(npc.Center); @@ -74,7 +74,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers shader.Parameters["burnIntensity"].SetValue(holyInfernoIntensity); shader.Parameters["playerPosition"].SetValue(target.Center); shader.Parameters["maxOpacity"].SetValue(maxOpacity); - shader.Parameters["day"].SetValue(Main.dayTime); + shader.Parameters["day"].SetValue(Main.IsItDay()); spriteBatch.GraphicsDevice.Textures[1] = diagonalNoise.Value; spriteBatch.GraphicsDevice.Textures[2] = upwardNoise.Value; diff --git a/Items/SummonItems/EyeofDesolation.cs b/Items/SummonItems/EyeofDesolation.cs index dab9ba5b48..7e66341a3c 100644 --- a/Items/SummonItems/EyeofDesolation.cs +++ b/Items/SummonItems/EyeofDesolation.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.SummonItems public override bool CanUseItem(Player player) { - return !Main.dayTime && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; + return !Main.IsItDay() && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; } public override bool? UseItem(Player player) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ee5fc159f5..8b6cb00f8e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -308,10 +308,7 @@ BloodstainedGlove: { BloodyWormScarf: { DisplayName: Bloody Worm Scarf - Tooltip: - ''' - 10% increased damage reduction and melee damage - ''' + Tooltip: 10% increased damage reduction and melee damage } BloodyWormTooth: { diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index ad356bcd8d..0e126c99e5 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.AstrumAureus float lifeRatio = NPC.life / (float)NPC.lifeMax; // Phase 2 check - bool phase2 = lifeRatio <= 0.5f || Main.dayTime; + bool phase2 = lifeRatio <= 0.5f || Main.IsItDay(); // Charge towards the target and explode after some time int inertia = 30; @@ -207,7 +207,7 @@ namespace CalamityMod.NPCs.AstrumAureus Point point = NPC.Center.ToTileCoordinates(); Tile tileSafely = Framing.GetTileSafely(point); bool explodeOnCollision = tileSafely.HasUnactuatedTile && Main.tileSolid[tileSafely.TileType] && !Main.tileSolidTop[tileSafely.TileType] && !TileID.Sets.Platforms[tileSafely.TileType]; - bool explodeOnAureus = distanceFromAureus < (180f + 30f * (NPC.scale - 1f)) && !Main.dayTime; + bool explodeOnAureus = distanceFromAureus < (180f + 30f * (NPC.scale - 1f)) && !Main.IsItDay(); if (vector.Length() < (60f + 30f * (NPC.scale - 1f)) || explodeOnCollision || explodeOnAureus || NPC.Calamity().newAI[0] >= enlargeDuration) { NPC.life = 0; @@ -335,7 +335,7 @@ namespace CalamityMod.NPCs.AstrumAureus return; // Damage Aureus for a percentage of its HP if the spawn explodes on or near it - if (Main.netMode != NetmodeID.MultiplayerClient && (Main.npc[CalamityGlobalNPC.astrumAureus].Center - NPC.Center).Length() < (200f + 30f * (NPC.scale - 1f)) && !Main.dayTime) + if (Main.netMode != NetmodeID.MultiplayerClient && (Main.npc[CalamityGlobalNPC.astrumAureus].Center - NPC.Center).Length() < (200f + 30f * (NPC.scale - 1f)) && !Main.IsItDay()) Projectile.NewProjectileDirect(NPC.GetSource_FromAI(), Main.npc[CalamityGlobalNPC.astrumAureus].Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Main.npc[CalamityGlobalNPC.astrumAureus].lifeMax / 200 * NPC.scale), 0f, Main.myPlayer, Main.npc[CalamityGlobalNPC.astrumAureus].whoAmI); } diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs index 6c4cd2eebb..5a651886f6 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Player player = Main.player[npc.target]; float enrageScale = bossRush ? 1f : 0f; - if ((Main.dayTime && !player.Calamity().ZoneAstral) || bossRush) + if ((Main.IsItDay() && !player.Calamity().ZoneAstral) || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 1f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs index 073b69b2ed..a5eab311c9 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs bool death = CalamityWorld.death || bossRush; float enrageScale = bossRush ? 0.5f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 1.5f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs index eb3ad41ba8..8d4ad3fad1 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Player player = Main.player[npc.target]; float enrageScale = bossRush ? 1f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 2f; @@ -775,7 +775,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Player player = Main.player[npc.target]; float enrageScale = bossRush ? 1f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 2f; @@ -1094,7 +1094,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Player player = Main.player[npc.target]; float enrageScale = bossRush ? 1f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 2f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 51e49f0908..d2f8c9929b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3251,7 +3251,7 @@ namespace CalamityMod.NPCs cirrusBossActive = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus; } - bool nightProvi = npc.type == NPCType() && !Main.dayTime; + bool nightProvi = npc.type == NPCType() && !Main.IsItDay(); bool dayEmpress = npc.type == NPCID.HallowBoss && NPC.ShouldEmpressBeEnraged(); if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && !cirrusBossActive && (nightProvi || dayEmpress)) { @@ -5313,7 +5313,7 @@ namespace CalamityMod.NPCs break; case NPCID.HallowBoss: - target.AddBuff(Main.dayTime ? BuffType() : BuffType(), 240); + target.AddBuff(NPC.ShouldEmpressBeEnraged() ? BuffType() : BuffType(), 240); break; case NPCID.BloodNautilus: diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs index fdf627d52f..9eb0924de0 100644 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ b/NPCs/NormalNPCs/SkeletronPrime2.cs @@ -226,7 +226,7 @@ namespace CalamityMod.NPCs.NormalNPCs } // Activate daytime enrage - if (Main.dayTime && !bossRush && NPC.ai[1] != 3f && NPC.ai[1] != 2f) + if (Main.IsItDay() && !bossRush && NPC.ai[1] != 3f && NPC.ai[1] != 2f) { // Heal if (Main.netMode != NetmodeID.MultiplayerClient) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 7a3b07d462..3705336c2d 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -366,7 +366,7 @@ namespace CalamityMod.NPCs.Providence colorShiftTimer = 0; } } - else if (!Main.dayTime || bossRush) //Normal Night time activity + else if (!Main.IsItDay() || bossRush) //Normal Night time activity NPC.localAI[1] = (float)BossMode.Night; else NPC.localAI[1] = (float)BossMode.Day; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 4d4936702a..02a07f2246 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.TargetClosest(); float enrageScale = bossRush ? 1f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { calamityGlobalNPC.CurrentlyEnraged = !bossRush; enrageScale += 2f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs index 16bc0e3123..8bf28b1f87 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float servantAndProjectileVelocity = (death ? 8f : 6f) + (masterMode ? 2f : 0f); float enrageScale = bossRush ? 1f : masterMode ? 0.5f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 2f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index 36e4852aca..6b1595cb9d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -808,7 +808,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Heal if on surface if (surface) { - if (Main.rand.NextBool(Main.dayTime ? 3 : 6)) + if (Main.rand.NextBool(Main.IsItDay() ? 3 : 6)) { int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Pixie, 0f, 0f, 200, default, 0.5f); Main.dust[dust].noGravity = true; @@ -824,7 +824,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Heal, 100 (50 during daytime) seconds to reach full HP from 0 calamityGlobalNPC.newAI[1] += 1f; - if (calamityGlobalNPC.newAI[1] >= (Main.dayTime ? 30f : 60f)) + if (calamityGlobalNPC.newAI[1] >= (Main.IsItDay() ? 30f : 60f)) { calamityGlobalNPC.newAI[1] = 0f; npc.SyncExtraAI(); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs index f5407f5719..58889d282c 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs @@ -136,7 +136,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Daytime enrage - if (Main.dayTime && !bossRush && npc.ai[1] != 3f && npc.ai[1] != 2f) + if (Main.IsItDay() && !bossRush && npc.ai[1] != 3f && npc.ai[1] != 2f) { npc.ai[1] = 2f; SoundEngine.PlaySound(SoundID.ForceRoar, npc.Center); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 5e55c7463f..40dd57a368 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Activate daytime enrage - if (Main.dayTime && !bossRush && npc.ai[1] != 3f && npc.ai[1] != 2f) + if (Main.IsItDay() && !bossRush && npc.ai[1] != 3f && npc.ai[1] != 2f) { // Heal if (Main.netMode != NetmodeID.MultiplayerClient) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index f671b5b13d..4c9cb2146d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.TargetClosest(); float enrageScale = bossRush ? 0.5f : masterMode ? 0.25f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 1f; @@ -1000,7 +1000,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.TargetClosest(); float enrageScale = bossRush ? 0.5f : masterMode ? 0.25f : 0f; - if (Main.dayTime || bossRush) + if (Main.IsItDay() || bossRush) { npc.Calamity().CurrentlyEnraged = !bossRush; enrageScale += 1f; diff --git a/Projectiles/Boss/DyingSun.cs b/Projectiles/Boss/DyingSun.cs index 9696f6a6a6..bf24ecdc3e 100644 --- a/Projectiles/Boss/DyingSun.cs +++ b/Projectiles/Boss/DyingSun.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Boss public Color SunColorFunction(float completionRatio) { - Color sunColor = Main.zenithWorld ? (new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.8f) : (Main.dayTime ? Color.Yellow : Color.Cyan); + Color sunColor = Main.zenithWorld ? (new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.8f) : (Main.IsItDay() ? Color.Yellow : Color.Cyan); return Color.Lerp(sunColor, Color.White, (float)Math.Sin(MathHelper.Pi * completionRatio) * 0.5f + 0.3f) * Projectile.Opacity; } diff --git a/Projectiles/Boss/HolyAura.cs b/Projectiles/Boss/HolyAura.cs index 99e5da60a0..0b0ee711af 100644 --- a/Projectiles/Boss/HolyAura.cs +++ b/Projectiles/Boss/HolyAura.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss bool underworld = Projectile.ai[0] == 2f; if (!Main.zenithWorld) { - if (Main.dayTime) + if (Main.IsItDay()) { color.R = 255; if (underworld) diff --git a/Projectiles/Boss/HolyExplosionBoom.cs b/Projectiles/Boss/HolyExplosionBoom.cs index 48e7b8cf16..a543577f17 100644 --- a/Projectiles/Boss/HolyExplosionBoom.cs +++ b/Projectiles/Boss/HolyExplosionBoom.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Boss public override float GetScreenshakePower(float pulseCompletionRatio) => CalamityUtils.Convert01To010(pulseCompletionRatio) * 16f; public override Color GetCurrentExplosionColor(float pulseCompletionRatio) { - Color explosionColor = Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : (Main.dayTime ? Color.Orange : Color.BlueViolet); + Color explosionColor = Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : (Main.IsItDay() ? Color.Orange : Color.BlueViolet); return Color.Lerp(explosionColor * 1.6f, Color.White, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); } public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Boss/SwirlingFire.cs b/Projectiles/Boss/SwirlingFire.cs index 1272700ac8..a1d5261879 100644 --- a/Projectiles/Boss/SwirlingFire.cs +++ b/Projectiles/Boss/SwirlingFire.cs @@ -27,13 +27,13 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { Vector2 fireVelocity = (Time / 6f).ToRotationVector2() * Main.rand.NextFloat(1.7f, 2.2f); - Dust fire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(3f, 3f), Main.zenithWorld || !Main.dayTime ? 267 : 6); + Dust fire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(3f, 3f), Main.zenithWorld || !Main.IsItDay() ? 267 : 6); fire.velocity = fireVelocity.RotatedBy(MathHelper.PiOver2); fire.scale = Main.rand.NextFloat(1.3f, 1.45f); fire.noGravity = true; if (Main.zenithWorld) fire.color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); - else if (!Main.dayTime) + else if (!Main.IsItDay()) fire.color = Color.Lerp(Color.Cyan, Color.BlueViolet, Main.rand.NextFloat()); Dust.CloneDust(fire).velocity = fireVelocity.RotatedBy(-MathHelper.PiOver2); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 317611d2d7..010a466e79 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1037,7 +1037,7 @@ namespace CalamityMod.Projectiles bool spreadOut = false; bool homeIn = false; float spreadOutCutoffTime = EmpressRainbowStreakSpreadOutCutoff; - float homeInCutoffTime = Main.dayTime ? (revMasterMode ? 55f : 65f) : (revMasterMode ? 70f : 80f); + float homeInCutoffTime = NPC.ShouldEmpressBeEnraged() ? (revMasterMode ? 55f : 65f) : (revMasterMode ? 70f : 80f); float spreadDeceleration = 0.97f; float minAcceleration = revMasterMode ? 0.075f : 0.05f; float maxAcceleration = revMasterMode ? 0.15f : 0.1f; diff --git a/Skies/CryogenSky.cs b/Skies/CryogenSky.cs index 33906c87eb..50ba224e5a 100644 --- a/Skies/CryogenSky.cs +++ b/Skies/CryogenSky.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Skies auroraColor *= fadeInLerp; if (FadeoutTimer > 0f) auroraColor *= fadeOutLerp; - if (Main.dayTime) + if (Main.IsItDay()) auroraColor *= 0.4f; float yBrightness = MathHelper.Lerp(1.5f, 0.5f, 1f - MathHelper.Clamp((Auroras[i].Center.Y + 300f) / 200f, 0f, 1f)) * 1.3f; diff --git a/Tiles/Astral/AstralBeacon.cs b/Tiles/Astral/AstralBeacon.cs index 16192bbdc8..399fc784f8 100644 --- a/Tiles/Astral/AstralBeacon.cs +++ b/Tiles/Astral/AstralBeacon.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.Astral bool usingStarcore = Main.LocalPlayer.HasItem(ModContent.ItemType()); - if (Main.dayTime) + if (Main.IsItDay()) { CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.DeusAltarRejectNightText", FailColor); return false; From 642325130fa4e7c511c5efabbe1715cfb5b441de Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 04:22:36 +0700 Subject: [PATCH 03/10] Position vector optimizations --- Projectiles/Boss/ApolloFireball.cs | 6 +- Projectiles/Boss/ApolloRocket.cs | 6 +- Projectiles/Boss/AresPlasmaFireball.cs | 6 +- Projectiles/Boss/AresTeslaOrb.cs | 6 +- Projectiles/Boss/AstralFlame.cs | 8 +-- Projectiles/Boss/BloodGeyser.cs | 2 +- Projectiles/Boss/BrimstoneHellfireball.cs | 2 +- Projectiles/Boss/DarkEnergyBall.cs | 6 +- Projectiles/Boss/DarkEnergyBall2.cs | 6 +- Projectiles/Boss/DeusMine.cs | 6 +- Projectiles/Boss/DoGBeamPortal.cs | 6 +- Projectiles/Boss/DoGFire.cs | 6 +- Projectiles/Boss/FrostMist.cs | 2 +- Projectiles/Boss/GreatSandBlast.cs | 2 +- Projectiles/Boss/HealOrbProv.cs | 2 +- Projectiles/Boss/HiveBombGoliath.cs | 2 +- Projectiles/Boss/HolyBlast.cs | 8 +-- Projectiles/Boss/HolyBomb.cs | 12 ++-- Projectiles/Boss/HolyFire.cs | 6 +- Projectiles/Boss/HolyFire2.cs | 6 +- Projectiles/Boss/HolyFlare.cs | 6 +- Projectiles/Boss/HolyLight.cs | 6 +- Projectiles/Boss/IceBlast.cs | 4 +- Projectiles/Boss/IceBomb.cs | 6 +- Projectiles/Boss/IceRain.cs | 6 +- Projectiles/Boss/IchorBlob.cs | 6 +- Projectiles/Boss/IchorShot.cs | 2 +- Projectiles/Boss/JewelProjectile.cs | 4 +- Projectiles/Boss/LeviathanBomb.cs | 6 +- Projectiles/Boss/MoltenBlob.cs | 6 +- Projectiles/Boss/MushBomb.cs | 8 +-- Projectiles/Boss/MushBombFall.cs | 8 +-- Projectiles/Boss/OldDukeGore.cs | 4 +- Projectiles/Boss/PhantomBlast.cs | 6 +- Projectiles/Boss/PhantomBlast2.cs | 6 +- Projectiles/Boss/PhantomGhostShot.cs | 2 +- Projectiles/Boss/PhantomHookShot.cs | 2 +- Projectiles/Boss/PhantomMine.cs | 6 +- Projectiles/Boss/RedLightningFeather.cs | 6 +- Projectiles/Boss/SandBlast.cs | 4 +- Projectiles/Boss/SignusScythe.cs | 8 +-- Projectiles/Boss/VileClot.cs | 6 +- Projectiles/Boss/WaterSpear.cs | 2 +- .../DraedonsArsenal/GatlingLaserShot.cs | 6 +- Projectiles/DraedonsArsenal/LaserRifleShot.cs | 6 +- .../DraedonsArsenal/PlasmaCasterShot.cs | 6 +- Projectiles/DraedonsArsenal/PulseRifleShot.cs | 6 +- .../DraedonsArsenal/TeslaCannonShot.cs | 6 +- Projectiles/Enemy/FlameBurstHostile.cs | 8 +-- Projectiles/Enemy/HorsWaterBlast.cs | 6 +- Projectiles/Enemy/InkBombHostile.cs | 6 +- Projectiles/Enemy/PufferExplosion.cs | 2 +- Projectiles/Healing/BurntSiennaProj.cs | 2 +- Projectiles/Healing/CactusHealOrb.cs | 2 +- Projectiles/Healing/EssenceFlame.cs | 6 +- Projectiles/Healing/Exoheal.cs | 2 +- Projectiles/Healing/GodSlayerHealOrb.cs | 2 +- Projectiles/Healing/RoyalHeal.cs | 2 +- Projectiles/Healing/ShinobiHealOrb.cs | 2 +- Projectiles/Magic/AbyssBall.cs | 6 +- Projectiles/Magic/Asteroid.cs | 8 +-- Projectiles/Magic/AsteroidMolten.cs | 8 +-- Projectiles/Magic/BeastScythe.cs | 10 ++-- Projectiles/Magic/BlackAnurianPlankton.cs | 2 +- Projectiles/Magic/BloodBeam.cs | 2 +- Projectiles/Magic/BrimstoneFireball.cs | 2 +- Projectiles/Magic/BrimstoneHomer.cs | 2 +- Projectiles/Magic/BrimstoneTentacle.cs | 2 +- Projectiles/Magic/ClamorNoctusStar.cs | 6 +- Projectiles/Magic/CosmicTentacle.cs | 2 +- Projectiles/Magic/DivineRetributionSpear.cs | 6 +- Projectiles/Magic/EldritchTentacle.cs | 2 +- Projectiles/Magic/ElementTentacle.cs | 2 +- Projectiles/Magic/FatesRevealFlame.cs | 6 +- Projectiles/Magic/GhastlyBlast.cs | 12 ++-- Projectiles/Magic/GhastlyExplosion.cs | 6 +- Projectiles/Magic/GhastlyExplosionShard.cs | 6 +- Projectiles/Magic/GraniteEnergy.cs | 2 +- .../Magic/HellfireExplosionFriendly.cs | 2 +- Projectiles/Magic/HellwingPillar.cs | 2 +- Projectiles/Magic/HolyFlame.cs | 6 +- Projectiles/Magic/IcicleStaffProj.cs | 2 +- Projectiles/Magic/LightBall.cs | 6 +- Projectiles/Magic/MadAlchemistsCocktailAlt.cs | 8 +-- Projectiles/Magic/MadAlchemistsCocktailRed.cs | 10 ++-- .../Magic/MadAlchemistsCocktailShrapnel.cs | 2 +- Projectiles/Magic/MelterAmp.cs | 2 +- Projectiles/Magic/NebulaCloud.cs | 2 +- Projectiles/Magic/NebulaCloudCore.cs | 10 ++-- Projectiles/Magic/PhantasmalFuryProj.cs | 4 +- Projectiles/Magic/Phantom.cs | 2 +- Projectiles/Magic/PlagueFang.cs | 8 +-- Projectiles/Magic/SHPExplosion.cs | 2 +- Projectiles/Magic/SanguineFlareProj.cs | 6 +- Projectiles/Magic/SerpentineBody.cs | 2 +- Projectiles/Magic/SerpentineHead.cs | 8 +-- Projectiles/Magic/SerpentineTail.cs | 2 +- Projectiles/Magic/SnowflakeIceStar.cs | 2 +- Projectiles/Magic/StickyFeather.cs | 6 +- .../Magic/SupremeDustFlakProjectile.cs | 4 +- Projectiles/Magic/SupremeDustProjectile.cs | 4 +- Projectiles/Magic/TearsofHeavenProjectile.cs | 4 +- Projectiles/Magic/UndinesRetributionSpear.cs | 6 +- Projectiles/Magic/VenusianBolt.cs | 2 +- Projectiles/Magic/VenusianExplosion.cs | 2 +- Projectiles/Magic/WyvernFeatherGreen.cs | 6 +- Projectiles/Magic/WyvernFeatherPink.cs | 6 +- Projectiles/Magic/WyvernFeatherPurple.cs | 6 +- Projectiles/Melee/AegisBeam.cs | 2 +- Projectiles/Melee/AegisBlast.cs | 2 +- Projectiles/Melee/AegisBlast2.cs | 2 +- Projectiles/Melee/AmidiasWhirlpool.cs | 2 +- Projectiles/Melee/AtaraxiaMain.cs | 2 +- .../Melee/BalefulHarvesterProjectile.cs | 8 +-- Projectiles/Melee/BansheeHookBoom.cs | 10 ++-- Projectiles/Melee/Blood.cs | 2 +- Projectiles/Melee/Blood2.cs | 2 +- Projectiles/Melee/BloodBall.cs | 6 +- .../Melee/BrimlanceHellfireExplosion.cs | 2 +- Projectiles/Melee/Brimlash2.cs | 2 +- Projectiles/Melee/BrimlashProj.cs | 2 +- Projectiles/Melee/BrimstoneBoom.cs | 2 +- Projectiles/Melee/BrimstoneSwordExplosion.cs | 2 +- Projectiles/Melee/CometQuasherMeteor.cs | 6 +- Projectiles/Melee/CosmicIceBurst.cs | 10 ++-- Projectiles/Melee/DarkBall.cs | 6 +- Projectiles/Melee/DevilsSunriseCyclone.cs | 8 +-- Projectiles/Melee/DraconicSpark.cs | 2 +- Projectiles/Melee/ElementBall.cs | 2 +- Projectiles/Melee/EmpyreanKnife.cs | 2 +- Projectiles/Melee/EntropicFlechette.cs | 2 +- Projectiles/Melee/EntropicFlechetteLarge.cs | 2 +- Projectiles/Melee/EntropicFlechetteSmall.cs | 2 +- Projectiles/Melee/EssenceFlame2.cs | 6 +- Projectiles/Melee/Exocomet.cs | 6 +- Projectiles/Melee/FallenPaladinsHammerEcho.cs | 4 +- Projectiles/Melee/Flarefrost.cs | 2 +- Projectiles/Melee/GaelExplosion.cs | 2 +- Projectiles/Melee/GaelSkull.cs | 6 +- Projectiles/Melee/GaelSkull2.cs | 6 +- Projectiles/Melee/GalacticaComet.cs | 6 +- Projectiles/Melee/GalaxyBlast.cs | 8 +-- Projectiles/Melee/GalaxyBlastType2.cs | 8 +-- Projectiles/Melee/GalaxyBlastType3.cs | 8 +-- Projectiles/Melee/GreenWater.cs | 2 +- Projectiles/Melee/HolyColliderHolyFire.cs | 6 +- Projectiles/Melee/IceBombFriendly.cs | 6 +- Projectiles/Melee/IllustriousKnife.cs | 2 +- Projectiles/Melee/InsidiousHarpoon.cs | 6 +- Projectiles/Melee/JudgementProj.cs | 2 +- Projectiles/Melee/MonstrousKnife.cs | 2 +- Projectiles/Melee/MourningSkull.cs | 8 +-- Projectiles/Melee/Nebudust.cs | 2 +- Projectiles/Melee/OrderbringerBeam.cs | 6 +- Projectiles/Melee/OrderbringerRain.cs | 2 +- Projectiles/Melee/OrderbringerWhiteOrb.cs | 2 +- Projectiles/Melee/PlagueSeeker.cs | 2 +- Projectiles/Melee/PwnagehammerEcho.cs | 4 +- Projectiles/Melee/RSSolarFlare.cs | 6 +- Projectiles/Melee/RainBolt.cs | 2 +- Projectiles/Melee/RainbowBoom.cs | 2 +- Projectiles/Melee/Razorwind.cs | 2 +- Projectiles/Melee/SandFire.cs | 2 +- Projectiles/Melee/ScourgeoftheCosmosProj.cs | 4 +- Projectiles/Melee/SoulScytheExplosion.cs | 6 +- Projectiles/Melee/TenebreusTidesWaterSpear.cs | 6 +- Projectiles/Melee/TenebreusTidesWaterSword.cs | 6 +- Projectiles/Melee/TerrorBlast.cs | 6 +- Projectiles/Melee/TriactisHammerProj.cs | 12 ++-- Projectiles/Melee/TumbleweedFlail.cs | 6 +- Projectiles/Melee/TumbleweedRolling.cs | 6 +- Projectiles/Melee/UrchinBallSpike.cs | 2 +- Projectiles/Melee/VoidTentacle.cs | 2 +- Projectiles/Melee/WhiteOrb.cs | 2 +- Projectiles/Melee/Whiterain.cs | 2 +- Projectiles/Melee/Yoyos/SmokingCometYoyo.cs | 2 +- Projectiles/Pets/Bear.cs | 2 +- Projectiles/Pets/BrimlingPet.cs | 2 +- Projectiles/Pets/DannyDevitoPet.cs | 2 +- Projectiles/Pets/EidolonSnail.cs | 2 +- Projectiles/Pets/FlakPet.cs | 2 +- Projectiles/Pets/KendraPet.cs | 2 +- Projectiles/Pets/Sparks.cs | 2 +- Projectiles/Ranged/AquaBlast.cs | 4 +- Projectiles/Ranged/AquaBlastToxic.cs | 4 +- Projectiles/Ranged/AstralCannonProjectile.cs | 6 +- Projectiles/Ranged/AstrealFlame.cs | 6 +- Projectiles/Ranged/BigCoral.cs | 2 +- .../BlissfulBombardierDustProjectile.cs | 2 +- Projectiles/Ranged/CardClub.cs | 2 +- Projectiles/Ranged/CardClubSplit.cs | 2 +- Projectiles/Ranged/CardHeart.cs | 2 +- Projectiles/Ranged/CardSpade.cs | 2 +- Projectiles/Ranged/ChickenRocket.cs | 6 +- Projectiles/Ranged/ContagionBall.cs | 2 +- Projectiles/Ranged/DaemonsFlameArrow.cs | 6 +- Projectiles/Ranged/FeatherLarge.cs | 2 +- Projectiles/Ranged/FishronRPG.cs | 8 +-- Projectiles/Ranged/Flash.cs | 2 +- Projectiles/Ranged/FungiOrb.cs | 2 +- Projectiles/Ranged/FungiOrb2.cs | 2 +- Projectiles/Ranged/KarasawaShot.cs | 6 +- Projectiles/Ranged/LeafArrow.cs | 2 +- Projectiles/Ranged/MistArrow.cs | 2 +- Projectiles/Ranged/PlagueExplosionFriendly.cs | 2 +- Projectiles/Ranged/PlanarRipperExplosion.cs | 2 +- .../Ranged/PlanetaryAnnihilationProj.cs | 8 +-- Projectiles/Ranged/PlasmaExplosion.cs | 2 +- Projectiles/Ranged/RainbowBlast.cs | 2 +- Projectiles/Ranged/SandstormBullet.cs | 2 +- Projectiles/Ranged/SeasSearingSecondary.cs | 4 +- Projectiles/Ranged/SepticSkewerBacteria.cs | 2 +- Projectiles/Ranged/SepticSkewerHarpoon.cs | 2 +- Projectiles/Ranged/Shell.cs | 2 +- Projectiles/Ranged/Shockblast.cs | 2 +- Projectiles/Ranged/Sickness.cs | 2 +- Projectiles/Ranged/SlagRound.cs | 2 +- Projectiles/Ranged/SmallCoral.cs | 2 +- Projectiles/Ranged/SputterComet.cs | 2 +- Projectiles/Ranged/SputterCometBig.cs | 2 +- Projectiles/Ranged/SpykerProj.cs | 2 +- Projectiles/Ranged/StarmageddonStar.cs | 10 ++-- Projectiles/Ranged/StarmageddonStar2.cs | 10 ++-- Projectiles/Ranged/ThePackMinissile.cs | 2 +- Projectiles/Ranged/ThePackMissile.cs | 6 +- Projectiles/Ranged/VoidragonTentacle.cs | 2 +- Projectiles/Rogue/BallisticPoisonBombSpike.cs | 8 +-- Projectiles/Rogue/BrackishWater.cs | 2 +- Projectiles/Rogue/BrackishWaterBlast.cs | 2 +- Projectiles/Rogue/CobaltEnergy.cs | 4 +- Projectiles/Rogue/ExecutionersBladeProj.cs | 6 +- .../Rogue/ExecutionersBladeStealthProj.cs | 6 +- Projectiles/Rogue/ExplosiveSun.cs | 6 +- Projectiles/Rogue/GildedDaggerProj.cs | 2 +- Projectiles/Rogue/GleamingDaggerProj.cs | 2 +- Projectiles/Rogue/HeavenfallenEnergy.cs | 4 +- .../Rogue/HeavenfallenStardiskBoomerang.cs | 8 +-- Projectiles/Rogue/LeonidCometBig.cs | 6 +- Projectiles/Rogue/LeonidCometSmall.cs | 6 +- .../Rogue/LeonidProgenitorBombshell.cs | 2 +- Projectiles/Rogue/LostSoulFriendly.cs | 2 +- Projectiles/Rogue/LunarKunaiProj.cs | 6 +- Projectiles/Rogue/MalachiteBolt.cs | 20 +++---- Projectiles/Rogue/MalachiteProj.cs | 8 +-- Projectiles/Rogue/MeteorFistProj.cs | 10 ++-- Projectiles/Rogue/MeteorFistStealth.cs | 10 ++-- Projectiles/Rogue/MoltenBlobThrown.cs | 6 +- Projectiles/Rogue/RadiantExplosion.cs | 4 +- Projectiles/Rogue/ReaperProjectile.cs | 6 +- Projectiles/Rogue/RegulusEnergy.cs | 4 +- Projectiles/Rogue/RegulusRiotProj.cs | 2 +- Projectiles/Rogue/ScarletBlast.cs | 2 +- Projectiles/Rogue/ShatteredExplosion.cs | 2 +- Projectiles/Rogue/ShatteredSunKnife.cs | 6 +- Projectiles/Rogue/SnapClamProj.cs | 2 +- Projectiles/Rogue/SnapClamStealth.cs | 2 +- Projectiles/Rogue/SphereBladed.cs | 2 +- Projectiles/Rogue/SphereBlue.cs | 2 +- Projectiles/Rogue/SupernovaHoming.cs | 2 +- Projectiles/Rogue/SupernovaSpike.cs | 8 +-- Projectiles/Summon/AstrageldonSummon.cs | 2 +- .../Summon/BrimstoneExplosionMinion.cs | 2 +- Projectiles/Summon/BrimstoneFireSummon.cs | 2 +- Projectiles/Summon/BrimstoneFireballMinion.cs | 2 +- Projectiles/Summon/CausticStaffSummon.cs | 2 +- Projectiles/Summon/CosmicBlast.cs | 6 +- Projectiles/Summon/CosmicBlastBig.cs | 6 +- Projectiles/Summon/DaedalusCrystal.cs | 2 +- Projectiles/Summon/DaedalusCrystalShot.cs | 8 +-- Projectiles/Summon/DankCreeperMinion.cs | 4 +- Projectiles/Summon/EndoFire.cs | 2 +- Projectiles/Summon/FlameBlast.cs | 8 +-- Projectiles/Summon/FlameBurst.cs | 8 +-- Projectiles/Summon/ForbiddenCircletEater.cs | 2 +- Projectiles/Summon/FrostMistFriendly.cs | 2 +- Projectiles/Summon/GhostlyMine.cs | 12 ++-- .../Summon/GlacialEmbracePointyThing.cs | 2 +- Projectiles/Summon/HauntedDishes.cs | 4 +- Projectiles/Summon/IrradiatedAura.cs | 2 +- Projectiles/Summon/LanternFlame.cs | 6 +- Projectiles/Summon/MiniGuardianDefense.cs | 2 +- Projectiles/Summon/MiniGuardianHealer.cs | 2 +- Projectiles/Summon/PhantomicDagger.cs | 2 +- Projectiles/Summon/ProfanedEnergy.cs | 2 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 58 +++++++++---------- Projectiles/Summon/SakuraBullet.cs | 8 +-- Projectiles/Summon/VileFeederProjectile.cs | 2 +- Projectiles/Summon/VoidConcentrationOrb.cs | 2 +- Projectiles/Summon/WaterElementalMinion.cs | 2 +- Projectiles/Summon/WaterSpearFriendly.cs | 2 +- Projectiles/Typeless/AstralStar.cs | 6 +- Projectiles/Typeless/BlazingStarHeal.cs | 6 +- Projectiles/Typeless/BloodBomb.cs | 2 +- Projectiles/Typeless/BloodBombExplosion.cs | 2 +- .../BrimstoneHellfireballFriendly2.cs | 2 +- Projectiles/Typeless/CursorProj.cs | 4 +- Projectiles/Typeless/CursorProjSplit.cs | 10 ++-- Projectiles/Typeless/DeepseaBlaze.cs | 2 +- Projectiles/Typeless/DragonDust.cs | 2 +- Projectiles/Typeless/EmpyreanBlast.cs | 2 +- Projectiles/Typeless/EmpyreanGlob.cs | 2 +- Projectiles/Typeless/EmpyreanMarble.cs | 2 +- .../Typeless/EmpyreanStellarDetritus.cs | 2 +- Projectiles/Typeless/GhostlyBolt.cs | 4 +- Projectiles/Typeless/GodKiller.cs | 6 +- Projectiles/Typeless/GoldenGunProj.cs | 2 +- .../Typeless/HellfireExplosionFriendly2.cs | 2 +- .../Typeless/HideOfAstrumDeusExplosion.cs | 2 +- Projectiles/Typeless/HolyExplosion.cs | 6 +- Projectiles/Typeless/HydrothermalSmoke.cs | 4 +- Projectiles/Typeless/KelvinCatalystStar.cs | 2 +- Projectiles/Typeless/LunicBeam.cs | 10 ++-- Projectiles/Typeless/PendantProjectile1.cs | 2 +- Projectiles/Typeless/PendantProjectile2.cs | 2 +- Projectiles/Typeless/PendantProjectile3.cs | 2 +- Projectiles/Typeless/PoisonousSeawater.cs | 2 +- Projectiles/Typeless/StickyFeatherAero.cs | 6 +- 317 files changed, 696 insertions(+), 696 deletions(-) diff --git a/Projectiles/Boss/ApolloFireball.cs b/Projectiles/Boss/ApolloFireball.cs index e4d60c0243..d86f5eec5a 100644 --- a/Projectiles/Boss/ApolloFireball.cs +++ b/Projectiles/Boss/ApolloFireball.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); + int plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[plasmaDust].noGravity = true; @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss dust.velocity *= 3f; dust = Main.dust[plasmaDust]; - plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); + plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[plasmaDust]; @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); + int plasmaDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[plasmaDust2].noGravity = true; diff --git a/Projectiles/Boss/ApolloRocket.cs b/Projectiles/Boss/ApolloRocket.cs index 2e89eb928c..d18f5aaa7a 100644 --- a/Projectiles/Boss/ApolloRocket.cs +++ b/Projectiles/Boss/ApolloRocket.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); + int plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[plasmaDust].noGravity = true; @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss dust.velocity *= 3f; dust = Main.dust[plasmaDust]; - plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); + plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[plasmaDust]; @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); + int plasmaDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[plasmaDust2].noGravity = true; diff --git a/Projectiles/Boss/AresPlasmaFireball.cs b/Projectiles/Boss/AresPlasmaFireball.cs index 5890e6c384..15676d5635 100644 --- a/Projectiles/Boss/AresPlasmaFireball.cs +++ b/Projectiles/Boss/AresPlasmaFireball.cs @@ -89,14 +89,14 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); + int plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[plasmaDust].noGravity = true; Dust dust = Main.dust[plasmaDust]; dust.velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); + plasmaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[plasmaDust]; @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? 107 : 110; - int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); + int plasmaDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[plasmaDust2].noGravity = true; diff --git a/Projectiles/Boss/AresTeslaOrb.cs b/Projectiles/Boss/AresTeslaOrb.cs index 630c71f09a..cec82cf781 100644 --- a/Projectiles/Boss/AresTeslaOrb.cs +++ b/Projectiles/Boss/AresTeslaOrb.cs @@ -97,14 +97,14 @@ namespace CalamityMod.Projectiles.Boss int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229; float scale = randomDustType == 206 ? 1.5f : 1f; - int teslaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale); + int teslaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale); Main.dust[teslaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[teslaDust].noGravity = true; Dust dust = Main.dust[teslaDust]; dust.velocity *= 3f; - teslaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale); + teslaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale); Main.dust[teslaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[teslaDust]; @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Boss int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229; float scale = randomDustType == 206 ? 1.5f : 1f; - int teslaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale); + int teslaDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale); Main.dust[teslaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[teslaDust2].noGravity = true; diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index 88288c7d04..1b1f0af425 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.ai[0] += 1f; if (Projectile.ai[0] > 15f) { - int astralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 0.8f); + int astralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 0.8f); Main.dust[astralDust].noGravity = true; Main.dust[astralDust].velocity *= 0f; } @@ -162,14 +162,14 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); } for (int j = 0; j < 20; j++) { - int deathAstralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1.5f); + int deathAstralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1.5f); Main.dust[deathAstralDust].noGravity = true; Main.dust[deathAstralDust].velocity *= 3f; - deathAstralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 50, default, 1f); + deathAstralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 50, default, 1f); Main.dust[deathAstralDust].velocity *= 2f; Main.dust[deathAstralDust].noGravity = true; } diff --git a/Projectiles/Boss/BloodGeyser.cs b/Projectiles/Boss/BloodGeyser.cs index 40fff3fbf7..c6d458821e 100644 --- a/Projectiles/Boss/BloodGeyser.cs +++ b/Projectiles/Boss/BloodGeyser.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; - int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f); + int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f); Main.dust[bloody].noGravity = true; Main.dust[bloody].velocity *= 0f; diff --git a/Projectiles/Boss/BrimstoneHellfireball.cs b/Projectiles/Boss/BrimstoneHellfireball.cs index a628b51dce..1977fb8854 100644 --- a/Projectiles/Boss/BrimstoneHellfireball.cs +++ b/Projectiles/Boss/BrimstoneHellfireball.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.localAI[0] += 1f; } - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); Main.dust[brimDust].noGravity = true; Main.dust[brimDust].velocity *= 0.5f; Main.dust[brimDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index 237932a27f..35a7b1cdfb 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 3; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f); + int cosmiliteDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f); Main.dust[cosmiliteDust].velocity *= 3f; Main.dust[cosmiliteDust].noGravity = true; if (Main.rand.NextBool()) @@ -116,10 +116,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f); + int cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f); + cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 2f; } diff --git a/Projectiles/Boss/DarkEnergyBall2.cs b/Projectiles/Boss/DarkEnergyBall2.cs index 67acbf3fb0..8ff4db74e3 100644 --- a/Projectiles/Boss/DarkEnergyBall2.cs +++ b/Projectiles/Boss/DarkEnergyBall2.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 3; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f); + int cosmiliteDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f); Main.dust[cosmiliteDust].velocity *= 3f; Main.dust[cosmiliteDust].noGravity = true; if (Main.rand.NextBool()) @@ -114,10 +114,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f); + int cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f); + cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 2f; } diff --git a/Projectiles/Boss/DeusMine.cs b/Projectiles/Boss/DeusMine.cs index 6d42b696fb..83a4612665 100644 --- a/Projectiles/Boss/DeusMine.cs +++ b/Projectiles/Boss/DeusMine.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 5; i++) { - int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); + int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); Main.dust[purpleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -115,10 +115,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int astralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.7f); + int astralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.7f); Main.dust[astralDust].noGravity = true; Main.dust[astralDust].velocity *= 1.5f; - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); } // Spawn diagonal lasers diff --git a/Projectiles/Boss/DoGBeamPortal.cs b/Projectiles/Boss/DoGBeamPortal.cs index 0b1dccba03..8b54b531b6 100644 --- a/Projectiles/Boss/DoGBeamPortal.cs +++ b/Projectiles/Boss/DoGBeamPortal.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Boss for (int i = 0; i < 15; i++) { - int ectoDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.2f); + int ectoDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.2f); Main.dust[ectoDust].velocity *= 3f; Main.dust[ectoDust].noGravity = true; if (Main.rand.NextBool()) @@ -71,10 +71,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 30; j++) { - int ectoDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.7f); + int ectoDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.7f); Main.dust[ectoDust2].noGravity = true; Main.dust[ectoDust2].velocity *= 5f; - ectoDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1f); + ectoDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1f); Main.dust[ectoDust2].noGravity = true; Main.dust[ectoDust2].velocity *= 2f; } diff --git a/Projectiles/Boss/DoGFire.cs b/Projectiles/Boss/DoGFire.cs index 1d092a23f9..cf979d61ab 100644 --- a/Projectiles/Boss/DoGFire.cs +++ b/Projectiles/Boss/DoGFire.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - Projectile.height / 2; for (int i = 0; i < 5; i++) { - int godSlay = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int godSlay = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[godSlay].velocity *= 3f; if (Main.rand.NextBool()) { @@ -95,10 +95,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[godSlay2].noGravity = true; Main.dust[godSlay2].velocity *= 5f; - godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[godSlay2].velocity *= 2f; } for (int k = 0; k < 200; k++) diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index 88caa361fc..8cddc3dd3d 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 5; i++) { - int mistDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f); + int mistDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f); Main.dust[mistDust].velocity *= 3f; if (Main.rand.NextBool()) { diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index 1cb3cd0c9f..95b288c990 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.alpha = 0; } - int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); + int sandyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); Main.dust[sandyDust].noGravity = true; Main.dust[sandyDust].velocity *= 0f; } diff --git a/Projectiles/Boss/HealOrbProv.cs b/Projectiles/Boss/HealOrbProv.cs index ca00ceab13..90da5ae250 100644 --- a/Projectiles/Boss/HealOrbProv.cs +++ b/Projectiles/Boss/HealOrbProv.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { int playerTracker = (int)Projectile.ai[0]; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float playerDistX = Main.player[playerTracker].Center.X - projDirection.X; float playerDistY = Main.player[playerTracker].Center.Y - projDirection.Y; float playerDistance = (float)Math.Sqrt((double)(playerDistX * playerDistX + playerDistY * playerDistY)); diff --git a/Projectiles/Boss/HiveBombGoliath.cs b/Projectiles/Boss/HiveBombGoliath.cs index 16b224d9b7..a90bab176b 100644 --- a/Projectiles/Boss/HiveBombGoliath.cs +++ b/Projectiles/Boss/HiveBombGoliath.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Boss if (Main.netMode != NetmodeID.MultiplayerClient && Main.zenithWorld) { - Vector2 valueBoom = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 valueBoom = Projectile.Center; float spreadBoom = 15f * 0.0174f; double startAngleBoom = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spreadBoom / 2; double deltaAngleBoom = spreadBoom / 8f; diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index c523317c94..25d53b4421 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 10; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust].velocity *= 3f; Main.dust[holyDust].noGravity = true; if (Main.rand.NextBool()) @@ -136,15 +136,15 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int j = 0; j < 4; j++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f); Main.dust[dust].noGravity = true; } for (int k = 0; k < 40; k++) { - int profaned = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 4f); + int profaned = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 4f); Main.dust[profaned].noGravity = true; Main.dust[profaned].velocity *= 3f; - profaned = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f); + profaned = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f); Main.dust[profaned].velocity *= 2f; Main.dust[profaned].noGravity = true; } diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index fa9a74e5e0..edd791de8f 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -59,15 +59,15 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 2; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f); Main.dust[dust].noGravity = true; } for (int j = 0; j < 20; j++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 0, default, 2.5f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, velocityY, 0, default, 2.5f); Main.dust[holyDust].noGravity = true; Main.dust[holyDust].velocity *= 2f; - holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f); + holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f); Main.dust[holyDust].velocity *= 1.5f; Main.dust[holyDust].noGravity = true; } @@ -121,15 +121,15 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 2; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f); Main.dust[dust].noGravity = true; } for (int j = 0; j < 20; j++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f); Main.dust[holyDust].noGravity = true; Main.dust[holyDust].velocity *= 3f; - holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f); + holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f); Main.dust[holyDust].velocity *= 2f; Main.dust[holyDust].noGravity = true; } diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index 22b8313a0b..0b667c3a0c 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 5; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust].noGravity = true; if (Main.rand.NextBool()) { @@ -134,9 +134,9 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].noGravity = true; } } diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index 9c82f464cc..8d528e7f3c 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 5; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust].noGravity = true; if (Main.rand.NextBool()) { @@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].noGravity = true; } } diff --git a/Projectiles/Boss/HolyFlare.cs b/Projectiles/Boss/HolyFlare.cs index 4482b61ed4..9a2db931e3 100644 --- a/Projectiles/Boss/HolyFlare.cs +++ b/Projectiles/Boss/HolyFlare.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 5; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust].noGravity = true; if (Main.rand.NextBool()) { @@ -119,9 +119,9 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].noGravity = true; } } diff --git a/Projectiles/Boss/HolyLight.cs b/Projectiles/Boss/HolyLight.cs index 97c6efd2ad..5eb910ad3e 100644 --- a/Projectiles/Boss/HolyLight.cs +++ b/Projectiles/Boss/HolyLight.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 5; i++) { - int holyYellow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + int holyYellow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyYellow].velocity *= 3f; Main.dust[holyYellow].noGravity = true; if (Main.rand.NextBool()) @@ -114,10 +114,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 8; j++) { - int holyYellow2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); + int holyYellow2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); Main.dust[holyYellow2].noGravity = true; Main.dust[holyYellow2].velocity *= 5f; - holyYellow2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + holyYellow2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyYellow2].velocity *= 2f; Main.dust[holyYellow2].noGravity = true; } diff --git a/Projectiles/Boss/IceBlast.cs b/Projectiles/Boss/IceBlast.cs index 96a422fea2..5d27626298 100644 --- a/Projectiles/Boss/IceBlast.cs +++ b/Projectiles/Boss/IceBlast.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss for (int i = 0; i < 2; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.3f; } @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Boss //SoundEngine.PlaySound(SoundID.Item27, Projectile.Center); for (int i = 0; i < 5; i++) { - int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, 0f, 0f, 0, default, 1f); + int iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, 0f, 0f, 0, default, 1f); if (!Main.rand.NextBool(3)) { Dust dust = Main.dust[iceDust]; diff --git a/Projectiles/Boss/IceBomb.cs b/Projectiles/Boss/IceBomb.cs index 477f525a48..d963860aff 100644 --- a/Projectiles/Boss/IceBomb.cs +++ b/Projectiles/Boss/IceBomb.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 8; i++) { - int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); + int iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); Main.dust[iceDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -47,10 +47,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 14; j++) { - int iceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 3f); + int iceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 3f); Main.dust[iceDust2].noGravity = true; Main.dust[iceDust2].velocity *= 5f; - iceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); + iceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); Main.dust[iceDust2].velocity *= 2f; } diff --git a/Projectiles/Boss/IceRain.cs b/Projectiles/Boss/IceRain.cs index eb214c19ac..53674d6619 100644 --- a/Projectiles/Boss/IceRain.cs +++ b/Projectiles/Boss/IceRain.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Boss for (int i = 0; i < 2; i++) { - int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); + int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); Main.dust[icyDust].noGravity = true; Dust dust = Main.dust[icyDust]; dust.velocity *= 0.3f; @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss for (int i = 0; i < 2; i++) { - int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); + int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); Main.dust[icyDust].noGravity = true; Dust dust = Main.dust[icyDust]; dust.velocity *= 0.3f; @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss //SoundEngine.PlaySound(SoundID.Item27 with { Volume = SoundID.Item27.Volume * 0.25f }, Projectile.Center); for (int j = 0; j < 3; j++) { - int snowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Snow, 0f, 0f, 0, default, 1f); + int snowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Snow, 0f, 0f, 0, default, 1f); Main.dust[snowDust].noGravity = true; Main.dust[snowDust].noLight = true; Main.dust[snowDust].scale = 0.7f; diff --git a/Projectiles/Boss/IchorBlob.cs b/Projectiles/Boss/IchorBlob.cs index 052ad297fa..8f266377bd 100644 --- a/Projectiles/Boss/IchorBlob.cs +++ b/Projectiles/Boss/IchorBlob.cs @@ -102,14 +102,14 @@ namespace CalamityMod.Projectiles.Boss Vector2 dustVelocity = dustRotation * Projectile.velocity.Length(); for (int i = 0; i < 10; i++) { - int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 200, default, 1.6f); + int ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 200, default, 1.6f); Dust dust = Main.dust[ichorDust]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust.noGravity = true; dust.velocity.Y -= 2f; dust.velocity *= 3f; dust.velocity += dustVelocity * Main.rand.NextFloat(); - ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.8f); + ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.8f); dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust.velocity.Y -= 2f; dust.velocity *= 2f; @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int ichorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 0, default, 2f); + int ichorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 0, default, 2f); Dust dust = Main.dust[ichorDust2]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; dust.noGravity = true; diff --git a/Projectiles/Boss/IchorShot.cs b/Projectiles/Boss/IchorShot.cs index b5e1181eaf..0f7d9381e2 100644 --- a/Projectiles/Boss/IchorShot.cs +++ b/Projectiles/Boss/IchorShot.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; - int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.5f); + int ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.5f); Main.dust[ichorDust].noGravity = true; Main.dust[ichorDust].velocity *= 0f; diff --git a/Projectiles/Boss/JewelProjectile.cs b/Projectiles/Boss/JewelProjectile.cs index 001f4ffd01..39e6688a01 100644 --- a/Projectiles/Boss/JewelProjectile.cs +++ b/Projectiles/Boss/JewelProjectile.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.rotation += 0.3f * (float)Projectile.direction; for (int index = 0; index < 2; ++index) { - int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f); + int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f); Dust dust = Main.dust[ruby]; dust.noGravity = true; dust.velocity *= 0.3f; @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); for (int index1 = 0; index1 < 15; ++index1) { - int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f); + int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f); Dust dust = Main.dust[ruby]; dust.noGravity = true; dust.scale *= 1.25f; diff --git a/Projectiles/Boss/LeviathanBomb.cs b/Projectiles/Boss/LeviathanBomb.cs index 35ea92b3ea..95d42f96ed 100644 --- a/Projectiles/Boss/LeviathanBomb.cs +++ b/Projectiles/Boss/LeviathanBomb.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); for (int i = 0; i < 10; i++) { - int meteorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int meteorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[meteorDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 15; j++) { - int meteorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); + int meteorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); Main.dust[meteorDust2].noGravity = true; Main.dust[meteorDust2].velocity *= 5f; - meteorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + meteorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[meteorDust2].velocity *= 2f; } } diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index 36017903ea..a3ff5cf570 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); for (int i = 0; i < 3; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust].noGravity = true; if (Main.rand.NextBool()) { @@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].noGravity = true; } } diff --git a/Projectiles/Boss/MushBomb.cs b/Projectiles/Boss/MushBomb.cs index 0b169b86c5..a59168e670 100644 --- a/Projectiles/Boss/MushBomb.cs +++ b/Projectiles/Boss/MushBomb.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss } else { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; } @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 4; i++) { - int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); + int shroomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); Main.dust[shroomDust].velocity *= 1.5f; if (Main.rand.NextBool()) { @@ -128,10 +128,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 12; j++) { - int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); + int shroomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); Main.dust[shroomDust2].noGravity = true; Main.dust[shroomDust2].velocity *= 2f; - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); } } } diff --git a/Projectiles/Boss/MushBombFall.cs b/Projectiles/Boss/MushBombFall.cs index 99726b494b..934bc6bd68 100644 --- a/Projectiles/Boss/MushBombFall.cs +++ b/Projectiles/Boss/MushBombFall.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss } else { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; } @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 4; i++) { - int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); + int shroomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); Main.dust[shroomDust].velocity *= 1.5f; if (Main.rand.NextBool()) { @@ -131,10 +131,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 12; j++) { - int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); + int shroomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); Main.dust[shroomDust2].noGravity = true; Main.dust[shroomDust2].velocity *= 2f; - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); } if (Main.zenithWorld && NPC.CountNPCS(NPCID.Crab) < 20 && Main.netMode != NetmodeID.MultiplayerClient) diff --git a/Projectiles/Boss/OldDukeGore.cs b/Projectiles/Boss/OldDukeGore.cs index a056f7a29f..fb1110f055 100644 --- a/Projectiles/Boss/OldDukeGore.cs +++ b/Projectiles/Boss/OldDukeGore.cs @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Boss for (int d = 0; d < 6; d++) { - int acid = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 3f); + int acid = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 3f); Main.dust[acid].noGravity = true; Main.dust[acid].velocity *= 5f; - acid = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 2f); + acid = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 2f); Main.dust[acid].velocity *= 2f; Main.dust[acid].noGravity = true; } diff --git a/Projectiles/Boss/PhantomBlast.cs b/Projectiles/Boss/PhantomBlast.cs index aac3655908..fb76be00e3 100644 --- a/Projectiles/Boss/PhantomBlast.cs +++ b/Projectiles/Boss/PhantomBlast.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 3; i++) { - int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); + int killGhostDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); Main.dust[killGhostDust].velocity *= 3f; Main.dust[killGhostDust].noGravity = true; if (Main.rand.NextBool()) @@ -104,10 +104,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); + int killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); Main.dust[killGhostDust2].noGravity = true; Main.dust[killGhostDust2].velocity *= 5f; - killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); + killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); Main.dust[killGhostDust2].velocity *= 2f; } } diff --git a/Projectiles/Boss/PhantomBlast2.cs b/Projectiles/Boss/PhantomBlast2.cs index 911ecdbe38..f581c4a065 100644 --- a/Projectiles/Boss/PhantomBlast2.cs +++ b/Projectiles/Boss/PhantomBlast2.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 3; i++) { - int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f); + int killGhostDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f); Main.dust[killGhostDust].velocity *= 3f; Main.dust[killGhostDust].noGravity = true; if (Main.rand.NextBool()) @@ -104,10 +104,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 5; j++) { - int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.7f); + int killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.7f); Main.dust[killGhostDust2].noGravity = true; Main.dust[killGhostDust2].velocity *= 5f; - killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); + killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); Main.dust[killGhostDust2].velocity *= 2f; } } diff --git a/Projectiles/Boss/PhantomGhostShot.cs b/Projectiles/Boss/PhantomGhostShot.cs index a9c438dd33..61f6e7a116 100644 --- a/Projectiles/Boss/PhantomGhostShot.cs +++ b/Projectiles/Boss/PhantomGhostShot.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 40; i++) { - int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); + int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); Main.dust[redDust].velocity *= 3f; Main.dust[redDust].velocity += Projectile.velocity * 0.75f; Main.dust[redDust].scale *= 1.2f; diff --git a/Projectiles/Boss/PhantomHookShot.cs b/Projectiles/Boss/PhantomHookShot.cs index a537dcef27..133cb9ef32 100644 --- a/Projectiles/Boss/PhantomHookShot.cs +++ b/Projectiles/Boss/PhantomHookShot.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 40; i++) { - int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); + int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); Main.dust[redDust].velocity *= 3f; Main.dust[redDust].velocity += Projectile.velocity * 0.75f; Main.dust[redDust].scale *= 1.2f; diff --git a/Projectiles/Boss/PhantomMine.cs b/Projectiles/Boss/PhantomMine.cs index f52d473eba..31c1331385 100644 --- a/Projectiles/Boss/PhantomMine.cs +++ b/Projectiles/Boss/PhantomMine.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 15; i++) { - int phantomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); + int phantomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); Main.dust[phantomDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -91,10 +91,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 30; j++) { - int phantomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); + int phantomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); Main.dust[phantomDust2].noGravity = true; Main.dust[phantomDust2].velocity *= 5f; - phantomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); + phantomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); Main.dust[phantomDust2].velocity *= 2f; } } diff --git a/Projectiles/Boss/RedLightningFeather.cs b/Projectiles/Boss/RedLightningFeather.cs index c07ae69d9e..22d4f8d070 100644 --- a/Projectiles/Boss/RedLightningFeather.cs +++ b/Projectiles/Boss/RedLightningFeather.cs @@ -108,14 +108,14 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item109, Projectile.Center); for (int j = 0; j < 6; j++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); } for (int k = 0; k < 10; k++) { - int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); + int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); Main.dust[redDust].noGravity = true; Main.dust[redDust].velocity *= 3f; - redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); Main.dust[redDust].velocity *= 2f; Main.dust[redDust].noGravity = true; } diff --git a/Projectiles/Boss/SandBlast.cs b/Projectiles/Boss/SandBlast.cs index 1058251e21..53a8ae4d8c 100644 --- a/Projectiles/Boss/SandBlast.cs +++ b/Projectiles/Boss/SandBlast.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.Opacity > 1f) Projectile.Opacity = 1f; - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 0.8f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 0.8f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; } @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.2f); + int sandyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.2f); Main.dust[sandyDust].noGravity = true; Main.dust[sandyDust].position.X = Projectile.Center.X; Main.dust[sandyDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Boss/SignusScythe.cs b/Projectiles/Boss/SignusScythe.cs index 2c964e1bba..fba7051dee 100644 --- a/Projectiles/Boss/SignusScythe.cs +++ b/Projectiles/Boss/SignusScythe.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item73, Projectile.Center); } - int shadowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + int shadowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[shadowDust].noGravity = true; Main.dust[shadowDust].velocity *= 0f; @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); for (int i = 0; i < 5; i++) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[killDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -107,10 +107,10 @@ namespace CalamityMod.Projectiles.Boss } for (int j = 0; j < 10; j++) { - int killDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + int killDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); Main.dust[killDust2].noGravity = true; Main.dust[killDust2].velocity *= 5f; - killDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + killDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[killDust2].velocity *= 2f; } } diff --git a/Projectiles/Boss/VileClot.cs b/Projectiles/Boss/VileClot.cs index 13fd839fc3..b793e0bd72 100644 --- a/Projectiles/Boss/VileClot.cs +++ b/Projectiles/Boss/VileClot.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.velocity.Length() < 12f) Projectile.velocity *= 1.01f; - int vileDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), + int vileDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 100, default, 1.5f); Main.dust[vileDust].noGravity = true; @@ -51,11 +51,11 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item10, Projectile.Center); for (int i = 0; i < 6; i++) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 2.5f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 2.5f); Main.dust[killDust].noGravity = true; Dust dust = Main.dust[killDust]; dust.velocity *= 2f; - killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f); + killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f); dust = Main.dust[killDust]; dust.velocity *= 2f; } diff --git a/Projectiles/Boss/WaterSpear.cs b/Projectiles/Boss/WaterSpear.cs index b22f08b387..0580bbf1e2 100644 --- a/Projectiles/Boss/WaterSpear.cs +++ b/Projectiles/Boss/WaterSpear.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 10; i++) { - int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + int waterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[waterDust].velocity *= 3f; if (Main.rand.NextBool()) { diff --git a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs index 2813959508..f1292b9b35 100644 --- a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs +++ b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f); + int burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f); Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[burstDust].noGravity = true; @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust2.velocity *= 3f; dust2 = Main.dust[burstDust]; - burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f); + burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f); Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust2 = Main.dust[burstDust]; @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int moreBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f); + int moreBurstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f); Main.dust[moreBurstDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[moreBurstDust].noGravity = true; diff --git a/Projectiles/DraedonsArsenal/LaserRifleShot.cs b/Projectiles/DraedonsArsenal/LaserRifleShot.cs index 29e284b6fc..8e084688a8 100644 --- a/Projectiles/DraedonsArsenal/LaserRifleShot.cs +++ b/Projectiles/DraedonsArsenal/LaserRifleShot.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 2.5f); + int burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 2.5f); Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[burstDust].noGravity = true; @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust2.velocity *= 3f; dust2 = Main.dust[burstDust]; - burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 1.9f); + burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 1.9f); Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust2 = Main.dust[burstDust]; @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int burstDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 3.2f); + int burstDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 3.2f); Main.dust[burstDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[burstDust2].noGravity = true; diff --git a/Projectiles/DraedonsArsenal/PlasmaCasterShot.cs b/Projectiles/DraedonsArsenal/PlasmaCasterShot.cs index cd0d33500b..818b637bfe 100644 --- a/Projectiles/DraedonsArsenal/PlasmaCasterShot.cs +++ b/Projectiles/DraedonsArsenal/PlasmaCasterShot.cs @@ -164,7 +164,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool(2)? dust1 : dust2; - int plasmaBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); + int plasmaBurstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); Main.dust[plasmaBurstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[plasmaBurstDust].noGravity = true; @@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.velocity *= 3f; dust = Main.dust[plasmaBurstDust]; - plasmaBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); + plasmaBurstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); Main.dust[plasmaBurstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[plasmaBurstDust]; @@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool(2)? dust1 : dust2; - int plasmaBurstDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); + int plasmaBurstDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); Main.dust[plasmaBurstDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[plasmaBurstDust2].noGravity = true; diff --git a/Projectiles/DraedonsArsenal/PulseRifleShot.cs b/Projectiles/DraedonsArsenal/PulseRifleShot.cs index 5dec088568..be5877576e 100644 --- a/Projectiles/DraedonsArsenal/PulseRifleShot.cs +++ b/Projectiles/DraedonsArsenal/PulseRifleShot.cs @@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int pulseDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust3, dustVel.X, dustVel.Y, 200, default, 1.7f); + int pulseDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust3, dustVel.X, dustVel.Y, 200, default, 1.7f); Main.dust[pulseDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[pulseDust].noGravity = true; @@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.velocity *= 3f; dust = Main.dust[pulseDust]; - pulseDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust1, dustVel.X, dustVel.Y, 100, default, 1f); + pulseDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust1, dustVel.X, dustVel.Y, 100, default, 1f); Main.dust[pulseDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[pulseDust]; @@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dustVel = dustVel.RotatedBy(-angleRandom); dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - int pulseDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust2, dustVel.X, dustVel.Y, 0, default, 3f); + int pulseDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust2, dustVel.X, dustVel.Y, 0, default, 3f); Main.dust[pulseDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[pulseDust2].noGravity = true; diff --git a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs index 9833df6de4..6a6464955a 100644 --- a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs +++ b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal int randomDustType = Main.rand.NextBool(2)? dustArray[4] : dustArray[5]; float scale = randomDustType == dustArray[4] ? 1.5f : 1f; - int electricDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale); + int electricDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale); Main.dust[electricDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[electricDust].noGravity = true; @@ -244,7 +244,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.velocity *= 3f; dust = Main.dust[electricDust]; - electricDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale); + electricDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale); Main.dust[electricDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[electricDust]; @@ -265,7 +265,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal int randomDustType = Main.rand.NextBool(2)? dustArray[4] : dustArray[5]; float scale = randomDustType == dustArray[4] ? 1.5f : 1f; - int electricDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale); + int electricDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale); Main.dust[electricDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; Main.dust[electricDust2].noGravity = true; diff --git a/Projectiles/Enemy/FlameBurstHostile.cs b/Projectiles/Enemy/FlameBurstHostile.cs index 7e714c5e5a..64a1315e15 100644 --- a/Projectiles/Enemy/FlameBurstHostile.cs +++ b/Projectiles/Enemy/FlameBurstHostile.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Enemy Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int flameDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int flameDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[flameDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -46,10 +46,10 @@ namespace CalamityMod.Projectiles.Enemy } for (int j = 0; j < 20; j++) { - int sparkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); + int sparkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); Main.dust[sparkDust].noGravity = true; Main.dust[sparkDust].velocity *= 5f; - sparkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + sparkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[sparkDust].velocity *= 2f; } count += 1f; @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Enemy { for (int k = 0; k < 5; k++) { - int sparky = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f); + int sparky = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f); Main.dust[sparky].velocity *= 0f; } } diff --git a/Projectiles/Enemy/HorsWaterBlast.cs b/Projectiles/Enemy/HorsWaterBlast.cs index 98da26f0b4..ea5ecff51a 100644 --- a/Projectiles/Enemy/HorsWaterBlast.cs +++ b/Projectiles/Enemy/HorsWaterBlast.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Enemy { for (int i = 0; i < 20; i++) { - int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + int waterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[waterDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Enemy Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.35f / 255f); for (int j = 0; j < 10; j++) { - int watery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f); + int watery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f); Main.dust[watery].noGravity = true; Main.dust[watery].velocity *= 0.5f; Main.dust[watery].velocity += Projectile.velocity * 0.1f; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Enemy randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int killWaterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f); + int killWaterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f); Main.dust[killWaterDust].noGravity = true; Main.dust[killWaterDust].position.X = Projectile.Center.X; Main.dust[killWaterDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Enemy/InkBombHostile.cs b/Projectiles/Enemy/InkBombHostile.cs index 2041f553fd..82483c31a8 100644 --- a/Projectiles/Enemy/InkBombHostile.cs +++ b/Projectiles/Enemy/InkBombHostile.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Enemy Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int inkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Wraith, 0f, 0f, 100, default, 2f); + int inkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Wraith, 0f, 0f, 100, default, 2f); Main.dust[inkDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Enemy } for (int j = 0; j < 15; j++) { - int inkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 3f); + int inkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 3f); Main.dust[inkDust2].noGravity = true; Main.dust[inkDust2].velocity *= 5f; - inkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 2f); + inkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 2f); Main.dust[inkDust2].velocity *= 2f; } } diff --git a/Projectiles/Enemy/PufferExplosion.cs b/Projectiles/Enemy/PufferExplosion.cs index 423115e6f6..dc22fa1f93 100644 --- a/Projectiles/Enemy/PufferExplosion.cs +++ b/Projectiles/Enemy/PufferExplosion.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Enemy randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int explodeBrimStyle = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + int explodeBrimStyle = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Main.dust[explodeBrimStyle].noGravity = true; Main.dust[explodeBrimStyle].position.X = Projectile.Center.X; Main.dust[explodeBrimStyle].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Healing/BurntSiennaProj.cs b/Projectiles/Healing/BurntSiennaProj.cs index 380c850a31..76a4347133 100644 --- a/Projectiles/Healing/BurntSiennaProj.cs +++ b/Projectiles/Healing/BurntSiennaProj.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing Projectile.velocity *= 0.95f; Projectile.HealingProjectile(3, (int)Projectile.ai[0], 6f, 15f, false); - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[dusty]; dust.noGravity = true; dust.position.X -= Projectile.velocity.X * 0.2f; diff --git a/Projectiles/Healing/CactusHealOrb.cs b/Projectiles/Healing/CactusHealOrb.cs index 647649a00c..23f54b162e 100644 --- a/Projectiles/Healing/CactusHealOrb.cs +++ b/Projectiles/Healing/CactusHealOrb.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing Projectile.velocity.Y *= 0.98f; Projectile.HealingProjectile(15, Projectile.owner, 12f, 15f, false); - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 200, 0), 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 200, 0), 1.5f); Dust dust = Main.dust[dusty]; dust.noGravity = true; dust.position.X -= Projectile.velocity.X * 0.2f; diff --git a/Projectiles/Healing/EssenceFlame.cs b/Projectiles/Healing/EssenceFlame.cs index 5dda7fe29e..2b07b2e939 100644 --- a/Projectiles/Healing/EssenceFlame.cs +++ b/Projectiles/Healing/EssenceFlame.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Healing Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int godSlay = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int godSlay = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[godSlay].velocity *= 3f; if (Main.rand.NextBool()) { @@ -64,10 +64,10 @@ namespace CalamityMod.Projectiles.Healing } for (int j = 0; j < 15; j++) { - int godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[godSlay2].noGravity = true; Main.dust[godSlay2].velocity *= 5f; - godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[godSlay2].velocity *= 2f; } } diff --git a/Projectiles/Healing/Exoheal.cs b/Projectiles/Healing/Exoheal.cs index 386f1f457d..5df6ba4dd6 100644 --- a/Projectiles/Healing/Exoheal.cs +++ b/Projectiles/Healing/Exoheal.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Healing public override void AI() { Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 8f, 15f); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255)); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255)); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f; diff --git a/Projectiles/Healing/GodSlayerHealOrb.cs b/Projectiles/Healing/GodSlayerHealOrb.cs index 4600e83f74..bd309f1cf4 100644 --- a/Projectiles/Healing/GodSlayerHealOrb.cs +++ b/Projectiles/Healing/GodSlayerHealOrb.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Healing public override void AI() { Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 6.5f, 15f); - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Dust dust = Main.dust[dusty]; dust.noGravity = true; dust.position.X -= Projectile.velocity.X * 0.2f; diff --git a/Projectiles/Healing/RoyalHeal.cs b/Projectiles/Healing/RoyalHeal.cs index 998e494146..145c21fc49 100644 --- a/Projectiles/Healing/RoyalHeal.cs +++ b/Projectiles/Healing/RoyalHeal.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Healing public override void AI() { Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 18f, 10f); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f; diff --git a/Projectiles/Healing/ShinobiHealOrb.cs b/Projectiles/Healing/ShinobiHealOrb.cs index 7d366bbc23..b7027a962e 100644 --- a/Projectiles/Healing/ShinobiHealOrb.cs +++ b/Projectiles/Healing/ShinobiHealOrb.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing for (int i = 0; i < 3; i++) { - int magicHeal = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.MagicMirror, 0f, 0f, 100, default, 1.3f); + int magicHeal = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.MagicMirror, 0f, 0f, 100, default, 1.3f); Main.dust[magicHeal].noGravity = true; Main.dust[magicHeal].velocity *= 0f; } diff --git a/Projectiles/Magic/AbyssBall.cs b/Projectiles/Magic/AbyssBall.cs index 4a65f8550e..7b1c806410 100644 --- a/Projectiles/Magic/AbyssBall.cs +++ b/Projectiles/Magic/AbyssBall.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); for (int i = 0; i < 30; i++) { - int abyssal = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); + int abyssal = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); Main.dust[abyssal].velocity *= 3f; if (Main.rand.NextBool()) { @@ -54,10 +54,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 60; j++) { - int abyssal2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); + int abyssal2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); Main.dust[abyssal2].noGravity = true; Main.dust[abyssal2].velocity *= 5f; - abyssal2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + abyssal2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[abyssal2].velocity *= 2f; } } diff --git a/Projectiles/Magic/Asteroid.cs b/Projectiles/Magic/Asteroid.cs index 187d854c15..c109d2a738 100644 --- a/Projectiles/Magic/Asteroid.cs +++ b/Projectiles/Magic/Asteroid.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Magic greenDust.fadeIn = 0.5f; greenDust.noGravity = true; - int moreGreen = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f); + int moreGreen = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f); Main.dust[moreGreen].velocity *= 0.5f; Main.dust[moreGreen].scale *= 1.3f; Main.dust[moreGreen].fadeIn = 1f; @@ -69,14 +69,14 @@ namespace CalamityMod.Projectiles.Magic Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 4; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f); } for (int j = 0; j < 16; j++) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 2.5f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 2.5f); Main.dust[killDust].noGravity = true; Main.dust[killDust].velocity *= 3f; - killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 1.5f); + killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 1.5f); Main.dust[killDust].velocity *= 2f; Main.dust[killDust].noGravity = true; } diff --git a/Projectiles/Magic/AsteroidMolten.cs b/Projectiles/Magic/AsteroidMolten.cs index c9339ebb55..00414066b7 100644 --- a/Projectiles/Magic/AsteroidMolten.cs +++ b/Projectiles/Magic/AsteroidMolten.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic flaming.fadeIn = 0.5f; flaming.noGravity = true; - int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 0, new Color(255, Main.DiscoG, 0), 1f); + int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 0, new Color(255, Main.DiscoG, 0), 1f); Main.dust[fiery].velocity *= 0.5f; Main.dust[fiery].scale *= 1.3f; Main.dust[fiery].fadeIn = 1f; @@ -70,14 +70,14 @@ namespace CalamityMod.Projectiles.Magic Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 8; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f); } for (int j = 0; j < 32; j++) { - int killFire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 2.5f); + int killFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 2.5f); Main.dust[killFire].noGravity = true; Main.dust[killFire].velocity *= 3f; - killFire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f); + killFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f); Main.dust[killFire].velocity *= 2f; Main.dust[killFire].noGravity = true; } diff --git a/Projectiles/Magic/BeastScythe.cs b/Projectiles/Magic/BeastScythe.cs index b28e8f0262..58223b592f 100644 --- a/Projectiles/Magic/BeastScythe.cs +++ b/Projectiles/Magic/BeastScythe.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic if (Main.player[Projectile.owner].channel) { float projDelay = 20f; - Vector2 vector10 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector10 = Projectile.Center; float projXDirection = (float)Main.mouseX + Main.screenPosition.X - vector10.X; float projYDirection = (float)Main.mouseY + Main.screenPosition.Y - vector10.Y; if (Main.player[Projectile.owner].gravDir == -1f) @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Magic else { Projectile.netUpdate = true; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float projXDir = (float)Main.mouseX + Main.screenPosition.X - projDirection.X; float projYDir = (float)Main.mouseY + Main.screenPosition.Y - projDirection.Y; if (Main.player[Projectile.owner].gravDir == -1f) @@ -149,18 +149,18 @@ namespace CalamityMod.Projectiles.Magic bool isInTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); for (int m = 0; m < 4; m++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); } for (int n = 0; n < 4; n++) { - int beastial = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f); + int beastial = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f); Main.dust[beastial].noGravity = true; Main.dust[beastial].velocity *= 3f; if (isInTile) { Main.dust[beastial].noLight = true; } - beastial = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + beastial = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); Main.dust[beastial].velocity *= 2f; Main.dust[beastial].noGravity = true; if (isInTile) diff --git a/Projectiles/Magic/BlackAnurianPlankton.cs b/Projectiles/Magic/BlackAnurianPlankton.cs index 6184df28ad..4eecaab9f7 100644 --- a/Projectiles/Magic/BlackAnurianPlankton.cs +++ b/Projectiles/Magic/BlackAnurianPlankton.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Magic } float projVelModifier = 0.1f; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float xDest = projX - projDirection.X; float yDest = projY - projDirection.Y; float destinationDist = (float)Math.Sqrt((double)(xDest * xDest + yDest * yDest)); diff --git a/Projectiles/Magic/BloodBeam.cs b/Projectiles/Magic/BloodBeam.cs index de9a5cf66b..8b8d6d3a32 100644 --- a/Projectiles/Magic/BloodBeam.cs +++ b/Projectiles/Magic/BloodBeam.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic } Projectile.ai[0] += 1f; int dustType = DustID.Blood; - int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[blood]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Magic/BrimstoneFireball.cs b/Projectiles/Magic/BrimstoneFireball.cs index 3e53340932..2ea07787ae 100644 --- a/Projectiles/Magic/BrimstoneFireball.cs +++ b/Projectiles/Magic/BrimstoneFireball.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { - int brimstone = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimstone = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimstone].noGravity = true; Main.dust[brimstone].velocity *= 0f; } diff --git a/Projectiles/Magic/BrimstoneHomer.cs b/Projectiles/Magic/BrimstoneHomer.cs index 125ca1fcde..a50b9a5251 100644 --- a/Projectiles/Magic/BrimstoneHomer.cs +++ b/Projectiles/Magic/BrimstoneHomer.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.rotation += 0.7f * Projectile.direction; - int brimstone = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); + int brimstone = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); Main.dust[brimstone].noGravity = true; if (Projectile.timeLeft < 150) diff --git a/Projectiles/Magic/BrimstoneTentacle.cs b/Projectiles/Magic/BrimstoneTentacle.cs index 20d11d3705..d49ed65926 100644 --- a/Projectiles/Magic/BrimstoneTentacle.cs +++ b/Projectiles/Magic/BrimstoneTentacle.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic int scaleLoopCheck = 0; while ((float)scaleLoopCheck < Projectile.scale * 10f) { - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.5f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.5f); Main.dust[brimDust].position = (Main.dust[brimDust].position + Projectile.Center) / 2f; Main.dust[brimDust].noGravity = true; Main.dust[brimDust].velocity *= 0.1f; diff --git a/Projectiles/Magic/ClamorNoctusStar.cs b/Projectiles/Magic/ClamorNoctusStar.cs index 895e3c6340..36e9c1e8df 100644 --- a/Projectiles/Magic/ClamorNoctusStar.cs +++ b/Projectiles/Magic/ClamorNoctusStar.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.localNPCHitCooldown = 10; for (int i = 0; i < 15; i++) { - int brightDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.2f); + int brightDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.2f); Main.dust[brightDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j++) { - int brightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.7f); + int brightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.7f); Main.dust[brightDust2].noGravity = true; Main.dust[brightDust2].velocity *= 5f; - brightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1f); + brightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1f); Main.dust[brightDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/Projectiles/Magic/CosmicTentacle.cs b/Projectiles/Magic/CosmicTentacle.cs index f042b5e024..56b7b6ac47 100644 --- a/Projectiles/Magic/CosmicTentacle.cs +++ b/Projectiles/Magic/CosmicTentacle.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic int scaleLoopCheck = 0; while ((float)scaleLoopCheck < Projectile.scale * 10f) { - int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); + int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); Main.dust[purpleDust].position = (Main.dust[purpleDust].position + Projectile.Center) / 2f; Main.dust[purpleDust].noGravity = true; Main.dust[purpleDust].velocity *= 0.1f; diff --git a/Projectiles/Magic/DivineRetributionSpear.cs b/Projectiles/Magic/DivineRetributionSpear.cs index 3f2d17a9b8..95847a1b35 100644 --- a/Projectiles/Magic/DivineRetributionSpear.cs +++ b/Projectiles/Magic/DivineRetributionSpear.cs @@ -92,14 +92,14 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); for (int i = 0; i < 6; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); } for (int j = 0; j < 10; j++) { - int divinity = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); + int divinity = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); Main.dust[divinity].noGravity = true; Main.dust[divinity].velocity *= 3f; - divinity = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); + divinity = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0); Main.dust[divinity].velocity *= 2f; Main.dust[divinity].noGravity = true; } diff --git a/Projectiles/Magic/EldritchTentacle.cs b/Projectiles/Magic/EldritchTentacle.cs index 4d2cc4db38..d9773dcf12 100644 --- a/Projectiles/Magic/EldritchTentacle.cs +++ b/Projectiles/Magic/EldritchTentacle.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Magic int scaleLoopCheck = 0; while ((float)scaleLoopCheck < Projectile.scale * 10f) { - int eldritchRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); + int eldritchRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); Main.dust[eldritchRed].position = (Main.dust[eldritchRed].position + Projectile.Center) / 2f; Main.dust[eldritchRed].noGravity = true; Main.dust[eldritchRed].velocity *= 0.1f; diff --git a/Projectiles/Magic/ElementTentacle.cs b/Projectiles/Magic/ElementTentacle.cs index 90943ac8d2..2cd1d493bf 100644 --- a/Projectiles/Magic/ElementTentacle.cs +++ b/Projectiles/Magic/ElementTentacle.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic int scaleLoopCheck = 0; while ((float)scaleLoopCheck < Projectile.scale * 10f) { - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f); Main.dust[rainbow].position = (Main.dust[rainbow].position + Projectile.Center) / 2f; Main.dust[rainbow].noGravity = true; Main.dust[rainbow].velocity *= 0.1f; diff --git a/Projectiles/Magic/FatesRevealFlame.cs b/Projectiles/Magic/FatesRevealFlame.cs index 9609b93577..28d0743a61 100644 --- a/Projectiles/Magic/FatesRevealFlame.cs +++ b/Projectiles/Magic/FatesRevealFlame.cs @@ -143,13 +143,13 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 3; i = inc + 1) { - int redFate = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + int redFate = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); Main.dust[redFate].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; inc = i; } for (int j = 0; j < 10; j = inc + 1) { - int redFate2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); + int redFate2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); Main.dust[redFate2].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[redFate2].noGravity = true; Dust dust = Main.dust[redFate2]; @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Magic } for (int k = 0; k < 5; k = inc + 1) { - int redFate3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f); + int redFate3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f); Main.dust[redFate3].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f; Main.dust[redFate3].noGravity = true; Dust dust = Main.dust[redFate3]; diff --git a/Projectiles/Magic/GhastlyBlast.cs b/Projectiles/Magic/GhastlyBlast.cs index e3c627d5c6..20c61f0dab 100644 --- a/Projectiles/Magic/GhastlyBlast.cs +++ b/Projectiles/Magic/GhastlyBlast.cs @@ -206,7 +206,7 @@ namespace CalamityMod.Projectiles.Magic { float HomingVelocity = 24f; int HomingN = 8; - Vector2 projDistance = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDistance = Projectile.Center; float dx = projCenter.X - projDistance.X; float dy = projCenter.Y - projDistance.Y; float dist = (float)Math.Sqrt((double)(dx * dx + dy * dy)); @@ -253,17 +253,17 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 4; i++) { - int killRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + int killRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); Main.dust[killRed].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; } for (int j = 0; j < 30; j++) { - int killRed2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 3.7f); + int killRed2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 3.7f); Dust dust = Main.dust[killRed2]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust.noGravity = true; dust.velocity *= 3f; - killRed2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + killRed2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust.velocity *= 2f; dust.noGravity = true; @@ -272,7 +272,7 @@ namespace CalamityMod.Projectiles.Magic } for (int k = 0; k < 10; k++) { - int killRed3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.7f); + int killRed3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.7f); Dust dust = Main.dust[killRed3]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; dust.noGravity = true; @@ -280,7 +280,7 @@ namespace CalamityMod.Projectiles.Magic } for (int l = 0; l < 10; l++) { - int killRed4 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f); + int killRed4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f); Dust dust = Main.dust[killRed4]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; dust.noGravity = true; diff --git a/Projectiles/Magic/GhastlyExplosion.cs b/Projectiles/Magic/GhastlyExplosion.cs index 0c39d40733..1f353d8258 100644 --- a/Projectiles/Magic/GhastlyExplosion.cs +++ b/Projectiles/Magic/GhastlyExplosion.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic int dustType = (int)Projectile.ai[0]; for (int i = 0; i < 3; i = inc + 1) { - int ghostlyRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 1.2f); + int ghostlyRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 1.2f); Main.dust[ghostlyRed].position = (Main.dust[ghostlyRed].position + Projectile.Center) / 2f; Main.dust[ghostlyRed].noGravity = true; Dust dust = Main.dust[ghostlyRed]; @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 2; j = inc + 1) { - int ghostlyRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 0.4f); + int ghostlyRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 0.4f); if (j == 0) { Main.dust[ghostlyRed].position = (Main.dust[ghostlyRed].position + Projectile.Center * 5f) / 6f; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 20; i = inc + 1) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f); Dust dust; Main.dust[killDust].scale = 1.2f + (float)Main.rand.Next(-10, 11) * 0.01f; Main.dust[killDust].noGravity = true; diff --git a/Projectiles/Magic/GhastlyExplosionShard.cs b/Projectiles/Magic/GhastlyExplosionShard.cs index 4d391c1ee6..e5cffcf043 100644 --- a/Projectiles/Magic/GhastlyExplosionShard.cs +++ b/Projectiles/Magic/GhastlyExplosionShard.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 2; i = inc + 1) { - int explodeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 1.1f); + int explodeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 1.1f); Main.dust[explodeDust].position = (Main.dust[explodeDust].position + Projectile.Center) / 2f; Main.dust[explodeDust].noGravity = true; Dust dust = Main.dust[explodeDust]; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic for (int j = 0; j < 1; j = inc + 1) { - int explodeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); + int explodeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f); Main.dust[explodeDust].position = (Main.dust[explodeDust].position + Projectile.Center * 5f) / 6f; Dust dust = Main.dust[explodeDust]; dust.velocity *= 0.1f; @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 10; i = inc + 1) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f); Dust dust; Main.dust[killDust].scale = 1f + Main.rand.Next(-10, 11) * 0.01f; Main.dust[killDust].noGravity = true; diff --git a/Projectiles/Magic/GraniteEnergy.cs b/Projectiles/Magic/GraniteEnergy.cs index f0c0b5f3e2..3cdddd4d79 100644 --- a/Projectiles/Magic/GraniteEnergy.cs +++ b/Projectiles/Magic/GraniteEnergy.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.ToRadians(90); if (Main.rand.NextBool()) - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 0.6f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 0.6f); if (Projectile.timeLeft < 60) CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 600f, 12f, 20f); diff --git a/Projectiles/Magic/HellfireExplosionFriendly.cs b/Projectiles/Magic/HellfireExplosionFriendly.cs index dd34965370..f9d00ac445 100644 --- a/Projectiles/Magic/HellfireExplosionFriendly.cs +++ b/Projectiles/Magic/HellfireExplosionFriendly.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Magic randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[brimDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Magic/HellwingPillar.cs b/Projectiles/Magic/HellwingPillar.cs index 9f973691de..9fc02a2a06 100644 --- a/Projectiles/Magic/HellwingPillar.cs +++ b/Projectiles/Magic/HellwingPillar.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.ai[0] += 1f; if (Main.rand.NextBool(3)) { - int flareDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int flareDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[flareDust]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Magic/HolyFlame.cs b/Projectiles/Magic/HolyFlame.cs index 9c18b09a94..0d58ed03c6 100644 --- a/Projectiles/Magic/HolyFlame.cs +++ b/Projectiles/Magic/HolyFlame.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -67,10 +67,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 35; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; Main.dust[holyDust2].velocity *= 5f; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/IcicleStaffProj.cs b/Projectiles/Magic/IcicleStaffProj.cs index e97dbdb755..d3b209f90e 100644 --- a/Projectiles/Magic/IcicleStaffProj.cs +++ b/Projectiles/Magic/IcicleStaffProj.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic { for (int i = 0; i < 3; i++) { - int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.75f); + int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.75f); Main.dust[icyDust].noGravity = true; Main.dust[icyDust].velocity *= 0f; } diff --git a/Projectiles/Magic/LightBall.cs b/Projectiles/Magic/LightBall.cs index e3190faf25..c3ba7a74c3 100644 --- a/Projectiles/Magic/LightBall.cs +++ b/Projectiles/Magic/LightBall.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); for (int i = 0; i < 10; i++) { - int lightDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.2f); + int lightDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.2f); Main.dust[lightDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -54,10 +54,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 20; j++) { - int lightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.7f); + int lightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.7f); Main.dust[lightDust2].noGravity = true; Main.dust[lightDust2].velocity *= 5f; - lightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1f); + lightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1f); Main.dust[lightDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/MadAlchemistsCocktailAlt.cs b/Projectiles/Magic/MadAlchemistsCocktailAlt.cs index 902906faad..ee27293b30 100644 --- a/Projectiles/Magic/MadAlchemistsCocktailAlt.cs +++ b/Projectiles/Magic/MadAlchemistsCocktailAlt.cs @@ -75,19 +75,19 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 40; i = inc + 1) { - int alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 200, default, 2.5f); + int alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 200, default, 2.5f); Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[alchDust].noGravity = true; Dust dust = Main.dust[alchDust]; dust.velocity *= 4f; dust = Main.dust[alchDust]; dust.velocity += dustVelocity * Main.rand.NextFloat(); - alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, 1.8f); + alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, 1.8f); Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[alchDust]; dust.velocity *= 3f; Main.dust[alchDust].noGravity = true; - alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1.8f); + alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1.8f); Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[alchDust]; dust.velocity *= 2f; @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 20; j = inc + 1) { - int alchDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 2.5f); + int alchDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 2.5f); Main.dust[alchDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; Main.dust[alchDust2].noGravity = true; Dust dust = Main.dust[alchDust2]; diff --git a/Projectiles/Magic/MadAlchemistsCocktailRed.cs b/Projectiles/Magic/MadAlchemistsCocktailRed.cs index d81ed63366..9a7fb721b2 100644 --- a/Projectiles/Magic/MadAlchemistsCocktailRed.cs +++ b/Projectiles/Magic/MadAlchemistsCocktailRed.cs @@ -66,14 +66,14 @@ namespace CalamityMod.Projectiles.Magic int inc; for (int i = 0; i < 60; i = inc + 1) { - int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 200, default, 3f); + int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 200, default, 3f); Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[fiery].noGravity = true; Dust dust = Main.dust[fiery]; dust.velocity *= 8f; dust = Main.dust[fiery]; dust.velocity += dustVelocity * Main.rand.NextFloat(); - fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); + fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[fiery]; dust.velocity *= 6f; @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Magic Main.dust[fiery].color = Color.Crimson * 0.5f; dust = Main.dust[fiery]; dust.velocity += dustVelocity * Main.rand.NextFloat(); - fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); + fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[fiery]; dust.velocity *= 4f; @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Magic Main.dust[fiery].color = Color.Crimson * 0.5f; dust = Main.dust[fiery]; dust.velocity += dustVelocity * Main.rand.NextFloat(); - fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); + fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI); Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[fiery]; dust.velocity *= 2f; @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j = inc + 1) { - int fiery2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 0, default, 3.8f); + int fiery2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 0, default, 3.8f); Main.dust[fiery2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; Main.dust[fiery2].noGravity = true; Dust dust = Main.dust[fiery2]; diff --git a/Projectiles/Magic/MadAlchemistsCocktailShrapnel.cs b/Projectiles/Magic/MadAlchemistsCocktailShrapnel.cs index d54b34d4f4..36b15d16a3 100644 --- a/Projectiles/Magic/MadAlchemistsCocktailShrapnel.cs +++ b/Projectiles/Magic/MadAlchemistsCocktailShrapnel.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic } } - int extraDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + int extraDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[extraDust].noGravity = true; if (Projectile.timeLeft < 150) diff --git a/Projectiles/Magic/MelterAmp.cs b/Projectiles/Magic/MelterAmp.cs index 79b7da0ca6..12729568a3 100644 --- a/Projectiles/Magic/MelterAmp.cs +++ b/Projectiles/Magic/MelterAmp.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic int Damage = Projectile.damage; int type; Projectile.netUpdate = true; - Vector2 projAimDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projAimDirection = Projectile.Center; float ampXDirection = (float)Main.mouseX + Main.screenPosition.X - projAimDirection.X; float ampYDirection = (float)Main.mouseY + Main.screenPosition.Y - projAimDirection.Y; if (player.gravDir == -1f) diff --git a/Projectiles/Magic/NebulaCloud.cs b/Projectiles/Magic/NebulaCloud.cs index 2c9792fcf4..89797b1b20 100644 --- a/Projectiles/Magic/NebulaCloud.cs +++ b/Projectiles/Magic/NebulaCloud.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 15; i++) { - int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default(Color), 0.75f); + int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default(Color), 0.75f); Dust dust; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Magic/NebulaCloudCore.cs b/Projectiles/Magic/NebulaCloudCore.cs index bbb777d17b..ec996b011e 100644 --- a/Projectiles/Magic/NebulaCloudCore.cs +++ b/Projectiles/Magic/NebulaCloudCore.cs @@ -291,18 +291,18 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 6; i++) { - int blackDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 100, default(Color), 1.75f); + int blackDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 100, default(Color), 1.75f); Main.dust[blackDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f; } for (int j = 0; j < 45; j++) { - int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 200, default(Color), 5.05f); + int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 200, default(Color), 5.05f); Main.dust[purpleDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[purpleDust].noGravity = true; Dust dust = Main.dust[purpleDust]; dust.velocity *= 4f; - purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, 0f, 0f, 100, default(Color), 1.75f); + purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, 0f, 0f, 100, default(Color), 1.75f); Main.dust[purpleDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust = Main.dust[purpleDust]; dust.velocity *= 2.5f; @@ -313,7 +313,7 @@ namespace CalamityMod.Projectiles.Magic for (int k = 0; k < 15; k++) { - int purpleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 0, default(Color), 3.55f); + int purpleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 0, default(Color), 3.55f); Main.dust[purpleDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[purpleDust2].noGravity = true; Dust dust = Main.dust[purpleDust2]; @@ -322,7 +322,7 @@ namespace CalamityMod.Projectiles.Magic for (int l = 0; l < 15; l++) { - int blackDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 0, default(Color), 1.75f); + int blackDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 0, default(Color), 1.75f); Main.dust[blackDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[blackDust2].noGravity = true; Dust dust = Main.dust[blackDust2]; diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index c07f55756e..806fdadff5 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 3; i++) { - int spectre = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 2f); + int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 2f); Main.dust[spectre].noGravity = true; Main.dust[spectre].velocity *= 0.5f; Main.dust[spectre].velocity += Projectile.velocity * 0.1f; @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); for (int j = 0; j <= 10; j++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); } if (Projectile.owner == Main.myPlayer) { diff --git a/Projectiles/Magic/Phantom.cs b/Projectiles/Magic/Phantom.cs index 4d7728c35e..16f456274e 100644 --- a/Projectiles/Magic/Phantom.cs +++ b/Projectiles/Magic/Phantom.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 2; i++) { - int spectre = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); + int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); Main.dust[spectre].noGravity = true; } diff --git a/Projectiles/Magic/PlagueFang.cs b/Projectiles/Magic/PlagueFang.cs index ce781e990d..404d98ac35 100644 --- a/Projectiles/Magic/PlagueFang.cs +++ b/Projectiles/Magic/PlagueFang.cs @@ -37,12 +37,12 @@ namespace CalamityMod.Projectiles.Magic } if (Projectile.alpha == 0) { - int plagued = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PoisonStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f); + int plagued = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PoisonStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f); Main.dust[plagued].noGravity = true; Main.dust[plagued].velocity *= 0.6f; Main.dust[plagued].velocity -= Projectile.velocity * 0.4f; - int venomed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.VenomStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f); + int venomed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.VenomStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f); Main.dust[venomed].noGravity = true; Main.dust[venomed].velocity *= 0.2f; Main.dust[venomed].velocity -= Projectile.velocity * 0.4f; @@ -63,12 +63,12 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); for (int i = 0; i < 7; i++) { - int killPlague = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PoisonStaff, 0f, 0f, 100, default, 1f); + int killPlague = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PoisonStaff, 0f, 0f, 100, default, 1f); Main.dust[killPlague].noGravity = true; Main.dust[killPlague].velocity *= 1.2f; Main.dust[killPlague].velocity -= Projectile.oldVelocity * 0.3f; - int killVenom = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.VenomStaff, 0f, 0f, 100, default, 1f); + int killVenom = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.VenomStaff, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[killVenom]; dust.noGravity = true; dust.velocity *= 1.2f; diff --git a/Projectiles/Magic/SHPExplosion.cs b/Projectiles/Magic/SHPExplosion.cs index 8774aef62d..10f9bacce6 100644 --- a/Projectiles/Magic/SHPExplosion.cs +++ b/Projectiles/Magic/SHPExplosion.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic { randomDust = 187; } - int EXPLODE = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 2f); + int EXPLODE = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 2f); Main.dust[EXPLODE].noGravity = true; Main.dust[EXPLODE].position.X = Projectile.Center.X; Main.dust[EXPLODE].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Magic/SanguineFlareProj.cs b/Projectiles/Magic/SanguineFlareProj.cs index c4c2af6547..1d75f56d9a 100644 --- a/Projectiles/Magic/SanguineFlareProj.cs +++ b/Projectiles/Magic/SanguineFlareProj.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 3; i++) { - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.2f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -85,10 +85,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 6; j++) { - int brimDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.7f); + int brimDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.7f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); + brimDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); Main.dust[brimDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/SerpentineBody.cs b/Projectiles/Magic/SerpentineBody.cs index cede383764..c3586ae240 100644 --- a/Projectiles/Magic/SerpentineBody.cs +++ b/Projectiles/Magic/SerpentineBody.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic { for (int k = 0; k < 8; k++) { - int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); + int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); Dust dust = Main.dust[seaDust]; dust.velocity *= 0.3f; Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5); diff --git a/Projectiles/Magic/SerpentineHead.cs b/Projectiles/Magic/SerpentineHead.cs index 6d299bf7e3..b481581ad9 100644 --- a/Projectiles/Magic/SerpentineHead.cs +++ b/Projectiles/Magic/SerpentineHead.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.alpha = 0; } - int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); + int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); Dust dust = Main.dust[seaDust]; dust.velocity *= 0.3f; Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5); @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic if (Main.player[Projectile.owner].channel) { float chaseMouseDist = 18f; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float mouseX = (float)Main.mouseX + Main.screenPosition.X - projDirection.X; float mouseY = (float)Main.mouseY + Main.screenPosition.Y - projDirection.Y; if (Main.player[Projectile.owner].gravDir == -1f) @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Magic else if (Projectile.ai[0] <= 0f) { Projectile.netUpdate = true; - Vector2 faceDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 faceDirection = Projectile.Center; float miceX = (float)Main.mouseX + Main.screenPosition.X - faceDirection.X; float miceY = (float)Main.mouseY + Main.screenPosition.Y - faceDirection.Y; if (Main.player[Projectile.owner].gravDir == -1f) @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item10, Projectile.Center); for (int k = 0; k < 8; k++) { - int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); + int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); Dust dust = Main.dust[seaDust]; dust.velocity *= 0.3f; Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5); diff --git a/Projectiles/Magic/SerpentineTail.cs b/Projectiles/Magic/SerpentineTail.cs index c4ec8e38af..0d147b0b30 100644 --- a/Projectiles/Magic/SerpentineTail.cs +++ b/Projectiles/Magic/SerpentineTail.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic { for (int k = 0; k < 8; k++) { - int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); + int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f); Dust dust = Main.dust[seaDust]; dust.velocity *= 0.3f; Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5); diff --git a/Projectiles/Magic/SnowflakeIceStar.cs b/Projectiles/Magic/SnowflakeIceStar.cs index e4457b9642..8c7f685a45 100644 --- a/Projectiles/Magic/SnowflakeIceStar.cs +++ b/Projectiles/Magic/SnowflakeIceStar.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic if (Main.rand.NextBool(6)) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f); Main.dust[dust].velocity *= 0.3f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Magic/StickyFeather.cs b/Projectiles/Magic/StickyFeather.cs index a81fafe0ce..233d5383dd 100644 --- a/Projectiles/Magic/StickyFeather.cs +++ b/Projectiles/Magic/StickyFeather.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 15; i++) { - int blueDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f); + int blueDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f); Main.dust[blueDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -61,10 +61,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j++) { - int blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f); + int blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f); Main.dust[blueDust2].noGravity = true; Main.dust[blueDust2].velocity *= 5f; - blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f); + blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f); Main.dust[blueDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/SupremeDustFlakProjectile.cs b/Projectiles/Magic/SupremeDustFlakProjectile.cs index 3da2e15002..89a42b04c2 100644 --- a/Projectiles/Magic/SupremeDustFlakProjectile.cs +++ b/Projectiles/Magic/SupremeDustFlakProjectile.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic int dustType = 32; for (int i = 0; i < 2; i++) { - int earthyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[earthyDust]; if (Main.rand.NextBool(3)) { @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic } for (int i = 0; i < 2; i++) { - int earthyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[earthyDust]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Magic/SupremeDustProjectile.cs b/Projectiles/Magic/SupremeDustProjectile.cs index 4eb19e2b62..ef060f5907 100644 --- a/Projectiles/Magic/SupremeDustProjectile.cs +++ b/Projectiles/Magic/SupremeDustProjectile.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic } Projectile.ai[0] += 1f; int dustType = 32; - int earthyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[earthyDust]; if (Main.rand.NextBool()) { @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic dust.velocity.X *= 1.2f; dust.velocity.Y *= 1.2f; dust.scale *= dustScale; - int earthyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int earthyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust2 = Main.dust[earthyDust2]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Magic/TearsofHeavenProjectile.cs b/Projectiles/Magic/TearsofHeavenProjectile.cs index ef0279397e..55f39a937c 100644 --- a/Projectiles/Magic/TearsofHeavenProjectile.cs +++ b/Projectiles/Magic/TearsofHeavenProjectile.cs @@ -42,9 +42,9 @@ namespace CalamityMod.Projectiles.Magic Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { - int Smalldust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 1f); + int Smalldust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 1f); Main.dust[Smalldust].noGravity = true; - int Bigdust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f); + int Bigdust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f); Main.dust[Bigdust].noGravity = true; } diff --git a/Projectiles/Magic/UndinesRetributionSpear.cs b/Projectiles/Magic/UndinesRetributionSpear.cs index 584b433afb..7acf7ee178 100644 --- a/Projectiles/Magic/UndinesRetributionSpear.cs +++ b/Projectiles/Magic/UndinesRetributionSpear.cs @@ -103,14 +103,14 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item21, Projectile.Center); for (int i = 0; i < 4; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 6; j++) { - int undust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedsWingsRun, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int undust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedsWingsRun, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[undust].noGravity = true; Main.dust[undust].velocity *= 3f; - undust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedsWingsRun, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + undust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedsWingsRun, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[undust].velocity *= 2f; Main.dust[undust].noGravity = true; } diff --git a/Projectiles/Magic/VenusianBolt.cs b/Projectiles/Magic/VenusianBolt.cs index 2fada07e04..9bd19c76b1 100644 --- a/Projectiles/Magic/VenusianBolt.cs +++ b/Projectiles/Magic/VenusianBolt.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic } for (int i = 0; i < 3; i++) { - int venusDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 1.2f); + int venusDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 1.2f); Main.dust[venusDust].noGravity = true; Main.dust[venusDust].velocity *= 0.5f; Main.dust[venusDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Magic/VenusianExplosion.cs b/Projectiles/Magic/VenusianExplosion.cs index 12092ac7c9..199f6ca856 100644 --- a/Projectiles/Magic/VenusianExplosion.cs +++ b/Projectiles/Magic/VenusianExplosion.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Magic randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int venusDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 2.5f); + int venusDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 2.5f); Dust dust = Main.dust[venusDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Magic/WyvernFeatherGreen.cs b/Projectiles/Magic/WyvernFeatherGreen.cs index 2876a50bf9..77753bde0f 100644 --- a/Projectiles/Magic/WyvernFeatherGreen.cs +++ b/Projectiles/Magic/WyvernFeatherGreen.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.localNPCHitCooldown = 10; for (int i = 0; i < 15; i++) { - int greenDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1.2f); + int greenDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1.2f); Main.dust[greenDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -58,10 +58,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j++) { - int greenDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1.7f); + int greenDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1.7f); Main.dust[greenDust2].noGravity = true; Main.dust[greenDust2].velocity *= 5f; - greenDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1f); + greenDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GreenTorch, 0f, 0f, 100, default, 1f); Main.dust[greenDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/WyvernFeatherPink.cs b/Projectiles/Magic/WyvernFeatherPink.cs index f114195e38..0603088547 100644 --- a/Projectiles/Magic/WyvernFeatherPink.cs +++ b/Projectiles/Magic/WyvernFeatherPink.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.localNPCHitCooldown = 10; for (int i = 0; i < 15; i++) { - int pinkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1.2f); + int pinkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1.2f); Main.dust[pinkDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -58,10 +58,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j++) { - int pinkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1.7f); + int pinkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1.7f); Main.dust[pinkDust2].noGravity = true; Main.dust[pinkDust2].velocity *= 5f; - pinkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1f); + pinkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkTorch, 0f, 0f, 100, default, 1f); Main.dust[pinkDust2].velocity *= 2f; } } diff --git a/Projectiles/Magic/WyvernFeatherPurple.cs b/Projectiles/Magic/WyvernFeatherPurple.cs index e32b38ff08..11dab5c10b 100644 --- a/Projectiles/Magic/WyvernFeatherPurple.cs +++ b/Projectiles/Magic/WyvernFeatherPurple.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.localNPCHitCooldown = 10; for (int i = 0; i < 15; i++) { - int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); + int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); Main.dust[purpleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -58,10 +58,10 @@ namespace CalamityMod.Projectiles.Magic } for (int j = 0; j < 30; j++) { - int purpleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); + int purpleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); Main.dust[purpleDust2].noGravity = true; Main.dust[purpleDust2].velocity *= 5f; - purpleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + purpleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[purpleDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/AegisBeam.cs b/Projectiles/Melee/AegisBeam.cs index 99861a1fcc..ac9281d0db 100644 --- a/Projectiles/Melee/AegisBeam.cs +++ b/Projectiles/Melee/AegisBeam.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = speed / randoAdjuster; rando *= randoAdjuster; rando2 *= randoAdjuster; - int deathDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.2f); + int deathDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.2f); Dust dust = Main.dust[deathDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Melee/AegisBlast.cs b/Projectiles/Melee/AegisBlast.cs index 57e88874cd..21b5584084 100644 --- a/Projectiles/Melee/AegisBlast.cs +++ b/Projectiles/Melee/AegisBlast.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int goldDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.5f); + int goldDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.5f); Main.dust[goldDust].noGravity = true; Main.dust[goldDust].position.X = Projectile.Center.X; Main.dust[goldDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/AegisBlast2.cs b/Projectiles/Melee/AegisBlast2.cs index a7bcfd7d7c..b35cb4ca2a 100644 --- a/Projectiles/Melee/AegisBlast2.cs +++ b/Projectiles/Melee/AegisBlast2.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int goldDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.5f); + int goldDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.5f); Main.dust[goldDust].noGravity = true; Main.dust[goldDust].position.X = Projectile.Center.X; Main.dust[goldDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/AmidiasWhirlpool.cs b/Projectiles/Melee/AmidiasWhirlpool.cs index c7809b793e..b0277b9fcd 100644 --- a/Projectiles/Melee/AmidiasWhirlpool.cs +++ b/Projectiles/Melee/AmidiasWhirlpool.cs @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Melee if (isHoming) { int waterDust0 = 10; - Vector2 dustDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 dustDirection = Projectile.Center; float waterDust1 = projCenter.X - dustDirection.X; float waterDust2 = projCenter.Y - dustDirection.Y; float waterDust3 = (float)Math.Sqrt((double)(waterDust1 * waterDust1 + waterDust2 * waterDust2)); diff --git a/Projectiles/Melee/AtaraxiaMain.cs b/Projectiles/Melee/AtaraxiaMain.cs index 696ca66205..32c899409b 100644 --- a/Projectiles/Melee/AtaraxiaMain.cs +++ b/Projectiles/Melee/AtaraxiaMain.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - Vector2 corner = new Vector2(Projectile.position.X, Projectile.position.Y); + Vector2 corner = Projectile.position; for (int i = 0; i < 50; i++) { int idx = Dust.NewDust(corner, Projectile.width, Projectile.height, DustID.GemAmethyst, 0f, 0f, 0, new Color(210, 0, 255), 2.2f); diff --git a/Projectiles/Melee/BalefulHarvesterProjectile.cs b/Projectiles/Melee/BalefulHarvesterProjectile.cs index edb3f9a73e..a535e551ff 100644 --- a/Projectiles/Melee/BalefulHarvesterProjectile.cs +++ b/Projectiles/Melee/BalefulHarvesterProjectile.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee int npcTracker = (int)Projectile.ai[0]; if (Main.npc[npcTracker].active) { - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float projXVel = Main.npc[npcTracker].position.X - projDirection.X; float projYVel = Main.npc[npcTracker].position.Y - projDirection.Y; float projVelocity = (float)Math.Sqrt((double)(projXVel * projXVel + projYVel * projYVel)); @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Dig, Projectile.position); for (int j = 0; j < 5; j++) { - int deathDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int deathDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[deathDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -145,10 +145,10 @@ namespace CalamityMod.Projectiles.Melee } for (int k = 0; k < 10; k++) { - int deathDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); + int deathDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); Main.dust[deathDust2].noGravity = true; Main.dust[deathDust2].velocity *= 5f; - deathDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + deathDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[deathDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/BansheeHookBoom.cs b/Projectiles/Melee/BansheeHookBoom.cs index 6ef7c7ed6f..98a6105057 100644 --- a/Projectiles/Melee/BansheeHookBoom.cs +++ b/Projectiles/Melee/BansheeHookBoom.cs @@ -44,16 +44,16 @@ namespace CalamityMod.Projectiles.Melee Projectile.Damage(); for (int i = 0; i < 2; i++) { - int bansheeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + int bansheeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); Main.dust[bansheeDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; } for (int j = 0; j < 5; j++) { - int bansheeDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 2.7f); + int bansheeDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 2.7f); Main.dust[bansheeDust2].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[bansheeDust2].noGravity = true; Main.dust[bansheeDust2].velocity *= 3f; - bansheeDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.5f); + bansheeDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.5f); Main.dust[bansheeDust2].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[bansheeDust2].velocity *= 2f; Main.dust[bansheeDust2].noGravity = true; @@ -61,14 +61,14 @@ namespace CalamityMod.Projectiles.Melee } for (int k = 0; k < 2; k++) { - int bansheeDust3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 0, default, 2.7f); + int bansheeDust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 60, 0f, 0f, 0, default, 2.7f); Main.dust[bansheeDust3].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f; Main.dust[bansheeDust3].noGravity = true; Main.dust[bansheeDust3].velocity *= 3f; } for (int l = 0; l < 5; l++) { - int spiritDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 0, default, 1.5f); + int spiritDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 180, 0f, 0f, 0, default, 1.5f); Main.dust[spiritDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f; Main.dust[spiritDust].noGravity = true; Main.dust[spiritDust].velocity *= 3f; diff --git a/Projectiles/Melee/Blood.cs b/Projectiles/Melee/Blood.cs index 52eff68ae2..c0791c05b1 100644 --- a/Projectiles/Melee/Blood.cs +++ b/Projectiles/Melee/Blood.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 2; i++) { - int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1f); + int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1f); Main.dust[blood].noGravity = true; Main.dust[blood].velocity *= 0f; } diff --git a/Projectiles/Melee/Blood2.cs b/Projectiles/Melee/Blood2.cs index 18f0d26aa3..ee996f3ebe 100644 --- a/Projectiles/Melee/Blood2.cs +++ b/Projectiles/Melee/Blood2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 2; i++) { - int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1f); + int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1f); Main.dust[blood].noGravity = true; Main.dust[blood].velocity *= 0f; } diff --git a/Projectiles/Melee/BloodBall.cs b/Projectiles/Melee/BloodBall.cs index 8f6179b030..f9ad15cf39 100644 --- a/Projectiles/Melee/BloodBall.cs +++ b/Projectiles/Melee/BloodBall.cs @@ -108,15 +108,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); + int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); Main.dust[blood].velocity *= 1.4f; } for (int j = 0; j < 10; j++) { - int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2.5f); + int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2.5f); Main.dust[bloody].noGravity = true; Main.dust[bloody].velocity *= 5f; - bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); + bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); Main.dust[bloody].velocity *= 3f; } } diff --git a/Projectiles/Melee/BrimlanceHellfireExplosion.cs b/Projectiles/Melee/BrimlanceHellfireExplosion.cs index 506eb9d745..49d5d4b713 100644 --- a/Projectiles/Melee/BrimlanceHellfireExplosion.cs +++ b/Projectiles/Melee/BrimlanceHellfireExplosion.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee randAdjuster = rand3 / randAdjuster; rand1 *= randAdjuster; rand2 *= randAdjuster; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[brimDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Melee/Brimlash2.cs b/Projectiles/Melee/Brimlash2.cs index e5f2d3f657..aab7079a2a 100644 --- a/Projectiles/Melee/Brimlash2.cs +++ b/Projectiles/Melee/Brimlash2.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft < 90) CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 600f, 12f, 15f); - int redderDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.LifeDrain, 0f, 0f, 100, default, 1f); + int redderDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.LifeDrain, 0f, 0f, 100, default, 1f); Main.dust[redderDust].noGravity = true; Main.dust[redderDust].velocity *= 0.5f; Main.dust[redderDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/BrimlashProj.cs b/Projectiles/Melee/BrimlashProj.cs index 7793f99fb9..ce54bdae0b 100644 --- a/Projectiles/Melee/BrimlashProj.cs +++ b/Projectiles/Melee/BrimlashProj.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Kill(); } Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.05f / 255f, (255 - Projectile.alpha) * 0.05f / 255f); - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); Main.dust[brimDust].noGravity = true; Main.dust[brimDust].velocity *= 0.5f; Main.dust[brimDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/BrimstoneBoom.cs b/Projectiles/Melee/BrimstoneBoom.cs index ec9c5ef53a..eadf3c961e 100644 --- a/Projectiles/Melee/BrimstoneBoom.cs +++ b/Projectiles/Melee/BrimstoneBoom.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); Main.dust[brimDust].noGravity = true; Main.dust[brimDust].position.X = Projectile.Center.X; Main.dust[brimDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/BrimstoneSwordExplosion.cs b/Projectiles/Melee/BrimstoneSwordExplosion.cs index 83c48373b3..582e18faaf 100644 --- a/Projectiles/Melee/BrimstoneSwordExplosion.cs +++ b/Projectiles/Melee/BrimstoneSwordExplosion.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[brimDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Melee/CometQuasherMeteor.cs b/Projectiles/Melee/CometQuasherMeteor.cs index 77dd35224d..33025911bf 100644 --- a/Projectiles/Melee/CometQuasherMeteor.cs +++ b/Projectiles/Melee/CometQuasherMeteor.cs @@ -56,15 +56,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.ExpandHitboxBy((int)(128f * Projectile.scale)); for (int i = 0; i < 8; ++i) - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0.0f, 0.0f, 100, new Color(), 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0.0f, 0.0f, 100, new Color(), 1.5f); for (int j = 0; j < 32; ++j) { - int fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0.0f, 0.0f, 100, new Color(), 2.5f); + int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0.0f, 0.0f, 100, new Color(), 2.5f); Dust dust1 = Main.dust[fieryDust]; dust1.noGravity = true; dust1.velocity *= 3f; - int fieryDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0.0f, 0.0f, 100, new Color(), 1.5f); + int fieryDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust2 = Main.dust[fieryDust2]; dust2.velocity *= 2f; dust2.noGravity = true; diff --git a/Projectiles/Melee/CosmicIceBurst.cs b/Projectiles/Melee/CosmicIceBurst.cs index 3cc26a2c6c..a5b3a3a3eb 100644 --- a/Projectiles/Melee/CosmicIceBurst.cs +++ b/Projectiles/Melee/CosmicIceBurst.cs @@ -65,16 +65,16 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Item62, Projectile.position); for (int i = 0; i < 2; i++) { - int cosmicDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, new Color(150, 255, 255), 1f); + int cosmicDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, new Color(150, 255, 255), 1f); Main.dust[cosmicDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; } for (int j = 0; j < 3; j++) { - int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 200, new Color(150, 255, 255), 1f); + int iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 200, new Color(150, 255, 255), 1f); Main.dust[iceDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[iceDust].noGravity = true; Main.dust[iceDust].velocity *= 3f; - iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, new Color(150, 255, 255), 0.6f); + iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, new Color(150, 255, 255), 0.6f); Main.dust[iceDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[iceDust].velocity *= 2f; Main.dust[iceDust].noGravity = true; @@ -82,14 +82,14 @@ namespace CalamityMod.Projectiles.Melee } for (int k = 0; k < 2; k++) { - int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 0, new Color(150, 255, 255), 1f); + int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 0, new Color(150, 255, 255), 1f); Main.dust[icyDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f; Main.dust[icyDust].noGravity = true; Main.dust[icyDust].velocity *= 3f; } for (int l = 0; l < 3; l++) { - int freezeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 0, new Color(150, 255, 255), 0.6f); + int freezeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 0, new Color(150, 255, 255), 0.6f); Main.dust[freezeDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f; Main.dust[freezeDust].noGravity = true; Main.dust[freezeDust].velocity *= 3f; diff --git a/Projectiles/Melee/DarkBall.cs b/Projectiles/Melee/DarkBall.cs index 9595ee284c..93c4930826 100644 --- a/Projectiles/Melee/DarkBall.cs +++ b/Projectiles/Melee/DarkBall.cs @@ -109,15 +109,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int corruptDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 1.5f); + int corruptDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 1.5f); Main.dust[corruptDust].velocity *= 1.4f; } for (int j = 0; j < 10; j++) { - int corruptDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 2.5f); + int corruptDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 2.5f); Main.dust[corruptDust2].noGravity = true; Main.dust[corruptDust2].velocity *= 5f; - corruptDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 1.5f); + corruptDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 1.5f); Main.dust[corruptDust2].velocity *= 3f; } } diff --git a/Projectiles/Melee/DevilsSunriseCyclone.cs b/Projectiles/Melee/DevilsSunriseCyclone.cs index cc1e5045dd..8c04e8c38f 100644 --- a/Projectiles/Melee/DevilsSunriseCyclone.cs +++ b/Projectiles/Melee/DevilsSunriseCyclone.cs @@ -50,11 +50,11 @@ namespace CalamityMod.Projectiles.Melee if (red > 255) red = 255; - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(red, greenAndBlue, greenAndBlue), 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(red, greenAndBlue, greenAndBlue), 1f); Main.dust[dust].velocity *= 0.3f; Main.dust[dust].noGravity = true; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float x = Owner.position.X + (float)(Owner.width / 2) - projDirection.X; float y = Owner.position.Y + (float)(Owner.height / 2) - projDirection.Y; float distanceFromOwner = (float)Math.Sqrt((double)(x * x + y * y)); @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee { if (Owner.channel) { - Vector2 projTravel = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projTravel = Projectile.Center; float mouseDestX = (float)Main.mouseX + Main.screenPosition.X - projTravel.X; float mouseDestY = (float)Main.mouseY + Main.screenPosition.Y - projTravel.Y; @@ -155,7 +155,7 @@ namespace CalamityMod.Projectiles.Melee else if (Projectile.ai[0] <= 0f) { Projectile.netUpdate = true; - Vector2 projDirect = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirect = Projectile.Center; float miceX = (float)Main.mouseX + Main.screenPosition.X - projDirect.X; float miceY = (float)Main.mouseY + Main.screenPosition.Y - projDirect.Y; diff --git a/Projectiles/Melee/DraconicSpark.cs b/Projectiles/Melee/DraconicSpark.cs index bed1cda3bf..3ae085492e 100644 --- a/Projectiles/Melee/DraconicSpark.cs +++ b/Projectiles/Melee/DraconicSpark.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee if (foundTarget) { float speed = HomingVelocity; - Vector2 projCenter = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projCenter = Projectile.Center; float xDist = targetX - projCenter.X; float yDist = targetY - projCenter.Y; float dist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); diff --git a/Projectiles/Melee/ElementBall.cs b/Projectiles/Melee/ElementBall.cs index 47a404acc4..1999237276 100644 --- a/Projectiles/Melee/ElementBall.cs +++ b/Projectiles/Melee/ElementBall.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - int rainbowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, (float)(Projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + int rainbowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, (float)(Projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); Main.dust[rainbowDust].noGravity = true; Main.dust[rainbowDust].velocity *= 0f; diff --git a/Projectiles/Melee/EmpyreanKnife.cs b/Projectiles/Melee/EmpyreanKnife.cs index a02c5866f2..f34ef00167 100644 --- a/Projectiles/Melee/EmpyreanKnife.cs +++ b/Projectiles/Melee/EmpyreanKnife.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - int empyreanDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Enchanted_Pink, 0f, 0f, 100, default, 0.8f); + int empyreanDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Enchanted_Pink, 0f, 0f, 100, default, 0.8f); Main.dust[empyreanDust].noGravity = true; Main.dust[empyreanDust].velocity *= 1.2f; Main.dust[empyreanDust].velocity -= Projectile.oldVelocity * 0.3f; diff --git a/Projectiles/Melee/EntropicFlechette.cs b/Projectiles/Melee/EntropicFlechette.cs index e10fedbc63..d71aa2f35e 100644 --- a/Projectiles/Melee/EntropicFlechette.cs +++ b/Projectiles/Melee/EntropicFlechette.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee } } - int darkestDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); + int darkestDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); Main.dust[darkestDust].noGravity = true; Main.dust[darkestDust].velocity *= 0f; diff --git a/Projectiles/Melee/EntropicFlechetteLarge.cs b/Projectiles/Melee/EntropicFlechetteLarge.cs index 2863d3875c..b54b35ec53 100644 --- a/Projectiles/Melee/EntropicFlechetteLarge.cs +++ b/Projectiles/Melee/EntropicFlechetteLarge.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee } } - int darkestDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); + int darkestDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); Main.dust[darkestDust].noGravity = true; Main.dust[darkestDust].velocity *= 0f; diff --git a/Projectiles/Melee/EntropicFlechetteSmall.cs b/Projectiles/Melee/EntropicFlechetteSmall.cs index 3d074ead79..1db25a8648 100644 --- a/Projectiles/Melee/EntropicFlechetteSmall.cs +++ b/Projectiles/Melee/EntropicFlechetteSmall.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee } } - int darkestDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); + int darkestDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, default, 0.8f); Main.dust[darkestDust].noGravity = true; Main.dust[darkestDust].velocity *= 0f; diff --git a/Projectiles/Melee/EssenceFlame2.cs b/Projectiles/Melee/EssenceFlame2.cs index ad04d1ddd0..1b4a23fa60 100644 --- a/Projectiles/Melee/EssenceFlame2.cs +++ b/Projectiles/Melee/EssenceFlame2.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 5; i++) { - int essenceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int essenceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[essenceDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -68,10 +68,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 8; j++) { - int essenceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int essenceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[essenceDust2].noGravity = true; Main.dust[essenceDust2].velocity *= 5f; - essenceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + essenceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[essenceDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/Exocomet.cs b/Projectiles/Melee/Exocomet.cs index 5f7c2c6ac7..f25747109b 100644 --- a/Projectiles/Melee/Exocomet.cs +++ b/Projectiles/Melee/Exocomet.cs @@ -131,14 +131,14 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int exoDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int exoDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[exoDust].noGravity = true; Main.dust[exoDust].velocity *= 3f; - exoDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + exoDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[exoDust].velocity *= 2f; Main.dust[exoDust].noGravity = true; } diff --git a/Projectiles/Melee/FallenPaladinsHammerEcho.cs b/Projectiles/Melee/FallenPaladinsHammerEcho.cs index 172180ff06..6179abc42b 100644 --- a/Projectiles/Melee/FallenPaladinsHammerEcho.cs +++ b/Projectiles/Melee/FallenPaladinsHammerEcho.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); - Dust dust = Dust.NewDustPerfect(new Vector2(Projectile.position.X, Projectile.position.Y) + offset, DustID.RedTorch, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); + Dust dust = Dust.NewDustPerfect(Projectile.position + offset, DustID.RedTorch, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); dust.noGravity = true; } @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); - Dust dust = Dust.NewDustPerfect(new Vector2(Projectile.position.X, Projectile.position.Y) + offset, DustID.RedTorch, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); + Dust dust = Dust.NewDustPerfect(Projectile.position + offset, DustID.RedTorch, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); dust.noGravity = true; } } diff --git a/Projectiles/Melee/Flarefrost.cs b/Projectiles/Melee/Flarefrost.cs index 18198f7c62..29509bde38 100644 --- a/Projectiles/Melee/Flarefrost.cs +++ b/Projectiles/Melee/Flarefrost.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee Main.dust[flarefrost].noGravity = true; Main.dust[flarefrost].position = Projectile.Center + dustRotate; Main.dust[flarefrost].velocity = Projectile.velocity; - int frostflare = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 0.8f); + int frostflare = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 0.8f); Main.dust[frostflare].noGravity = true; Main.dust[frostflare].velocity *= 0f; } diff --git a/Projectiles/Melee/GaelExplosion.cs b/Projectiles/Melee/GaelExplosion.cs index 39fdd5e768..141812c720 100644 --- a/Projectiles/Melee/GaelExplosion.cs +++ b/Projectiles/Melee/GaelExplosion.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int gaelDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + int gaelDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[gaelDust].noGravity = true; Main.dust[gaelDust].position.X = Projectile.Center.X; Main.dust[gaelDust].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index a490bee689..6a373ced4b 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -141,15 +141,15 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.NPCDeath52, Projectile.Center); for (int i = 0; i < 3; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); } for (int i = 0; i < 30; i++) { float angle = MathHelper.TwoPi * i / 30f; - int dustIndex = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2.5f); + int dustIndex = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2.5f); Main.dust[dustIndex].noGravity = true; Main.dust[dustIndex].velocity *= 3f; - dustIndex = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); + dustIndex = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); Main.dust[dustIndex].velocity *= 2f; Main.dust[dustIndex].noGravity = true; Dust.NewDust(Projectile.Center + angle.ToRotationVector2() * 160f, 0, 0, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); diff --git a/Projectiles/Melee/GaelSkull2.cs b/Projectiles/Melee/GaelSkull2.cs index ae4031ab44..fca9fbb36f 100644 --- a/Projectiles/Melee/GaelSkull2.cs +++ b/Projectiles/Melee/GaelSkull2.cs @@ -124,15 +124,15 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.NPCDeath52, Projectile.Center); for (int i = 0; i < 3; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); } for (int i = 0; i < 30; i++) { float angle = MathHelper.TwoPi * i / 30f; - int dustIndex = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2.5f); + int dustIndex = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2.5f); Main.dust[dustIndex].noGravity = true; Main.dust[dustIndex].velocity *= 3f; - dustIndex = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); + dustIndex = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); Main.dust[dustIndex].velocity *= 2f; Main.dust[dustIndex].noGravity = true; Dust.NewDust(Projectile.Center + angle.ToRotationVector2() * 160f, 0, 0, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f); diff --git a/Projectiles/Melee/GalacticaComet.cs b/Projectiles/Melee/GalacticaComet.cs index e85357a6e8..fedde06c1d 100644 --- a/Projectiles/Melee/GalacticaComet.cs +++ b/Projectiles/Melee/GalacticaComet.cs @@ -122,14 +122,14 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 4; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TeleportationPotion, 0f, 0f, 50, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TeleportationPotion, 0f, 0f, 50, default, 1.5f); } for (int j = 0; j < 20; j++) { - int galaxyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 0, default, 2.5f); + int galaxyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 0, default, 2.5f); Main.dust[galaxyDust].noGravity = true; Main.dust[galaxyDust].velocity *= 3f; - galaxyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 50, default, 1.5f); + galaxyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 50, default, 1.5f); Main.dust[galaxyDust].velocity *= 2f; Main.dust[galaxyDust].noGravity = true; } diff --git a/Projectiles/Melee/GalaxyBlast.cs b/Projectiles/Melee/GalaxyBlast.cs index f5bcaa78b3..f5065f0ba0 100644 --- a/Projectiles/Melee/GalaxyBlast.cs +++ b/Projectiles/Melee/GalaxyBlast.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee return; } bool isInTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); - Dust blastDust = Main.dust[Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 1f)]; + Dust blastDust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 1f)]; blastDust.position = Projectile.Center; blastDust.velocity = Vector2.Zero; blastDust.noGravity = true; @@ -107,18 +107,18 @@ namespace CalamityMod.Projectiles.Melee bool insideTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); for (int m = 0; m < 4; m++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); } for (int n = 0; n < 4; n++) { - int killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f); + int killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f); Main.dust[killingPeople].noGravity = true; Main.dust[killingPeople].velocity *= 3f; if (insideTile) { Main.dust[killingPeople].noLight = true; } - killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); Main.dust[killingPeople].velocity *= 2f; Main.dust[killingPeople].noGravity = true; if (insideTile) diff --git a/Projectiles/Melee/GalaxyBlastType2.cs b/Projectiles/Melee/GalaxyBlastType2.cs index 74fa10a3c6..c511cee1ba 100644 --- a/Projectiles/Melee/GalaxyBlastType2.cs +++ b/Projectiles/Melee/GalaxyBlastType2.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Melee return; } bool isInTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); - Dust blastDust = Main.dust[Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f)]; + Dust blastDust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f)]; blastDust.position = Projectile.Center; blastDust.velocity = Vector2.Zero; blastDust.noGravity = true; @@ -108,18 +108,18 @@ namespace CalamityMod.Projectiles.Melee bool insideTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); for (int m = 0; m < 4; m++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); } for (int n = 0; n < 4; n++) { - int killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 2.5f); + int killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 2.5f); Main.dust[killingPeople].noGravity = true; Main.dust[killingPeople].velocity *= 3f; if (insideTile) { Main.dust[killingPeople].noLight = true; } - killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Main.dust[killingPeople].velocity *= 2f; Main.dust[killingPeople].noGravity = true; if (insideTile) diff --git a/Projectiles/Melee/GalaxyBlastType3.cs b/Projectiles/Melee/GalaxyBlastType3.cs index 05e10db8ba..707c0e8973 100644 --- a/Projectiles/Melee/GalaxyBlastType3.cs +++ b/Projectiles/Melee/GalaxyBlastType3.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee return; } bool isInTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); - Dust blastDust = Main.dust[Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 0, default, 1f)]; + Dust blastDust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 0, default, 1f)]; blastDust.position = Projectile.Center; blastDust.velocity = Vector2.Zero; blastDust.noGravity = true; @@ -107,18 +107,18 @@ namespace CalamityMod.Projectiles.Melee bool flag = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16)); for (int m = 0; m < 4; m++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 100, default, 1.5f); } for (int n = 0; n < 4; n++) { - int killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 0, default, 2.5f); + int killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 0, default, 2.5f); Main.dust[killingPeople].noGravity = true; Main.dust[killingPeople].velocity *= 3f; if (flag) { Main.dust[killingPeople].noLight = true; } - killingPeople = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 100, default, 1.5f); + killingPeople = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonWater, 0f, 0f, 100, default, 1.5f); Main.dust[killingPeople].velocity *= 2f; Main.dust[killingPeople].noGravity = true; if (flag) diff --git a/Projectiles/Melee/GreenWater.cs b/Projectiles/Melee/GreenWater.cs index bfbc3c344c..04f4538157 100644 --- a/Projectiles/Melee/GreenWater.cs +++ b/Projectiles/Melee/GreenWater.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; } - int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, Main.rand.NextFloat(1.6f, 2.4f)); + int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, Main.rand.NextFloat(1.6f, 2.4f)); Main.dust[blood].noGravity = true; Main.dust[blood].velocity *= 0.5f; } diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index 19d07abe03..18de4e6a0e 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 5; i++) { - int holy = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int holy = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); if (Main.rand.NextBool()) { Main.dust[holy].scale = 0.5f; @@ -83,9 +83,9 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 10; j++) { - int holy2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); + int holy2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); Main.dust[holy2].noGravity = true; - holy2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + holy2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); } } } diff --git a/Projectiles/Melee/IceBombFriendly.cs b/Projectiles/Melee/IceBombFriendly.cs index 167db4a929..90414812a7 100644 --- a/Projectiles/Melee/IceBombFriendly.cs +++ b/Projectiles/Melee/IceBombFriendly.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 8; i++) { - int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); + int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); Main.dust[icyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -70,10 +70,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 14; j++) { - int icyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 3f); + int icyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 3f); Main.dust[icyDust2].noGravity = true; Main.dust[icyDust2].velocity *= 5f; - icyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); + icyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f); Main.dust[icyDust2].velocity *= 2f; } diff --git a/Projectiles/Melee/IllustriousKnife.cs b/Projectiles/Melee/IllustriousKnife.cs index 6df53a1087..1129424d68 100644 --- a/Projectiles/Melee/IllustriousKnife.cs +++ b/Projectiles/Melee/IllustriousKnife.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - int illustrious = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 0.8f); + int illustrious = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 0.8f); Main.dust[illustrious].noGravity = true; Main.dust[illustrious].velocity *= 1.2f; Main.dust[illustrious].velocity -= Projectile.oldVelocity * 0.3f; diff --git a/Projectiles/Melee/InsidiousHarpoon.cs b/Projectiles/Melee/InsidiousHarpoon.cs index aeef23ed36..f39bc1d501 100644 --- a/Projectiles/Melee/InsidiousHarpoon.cs +++ b/Projectiles/Melee/InsidiousHarpoon.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Damage(); for (int i = 0; i < 15; i++) { - int deathDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.2f); + int deathDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.2f); Main.dust[deathDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -98,10 +98,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 30; j++) { - int deathDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.7f); + int deathDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.7f); Main.dust[deathDust2].noGravity = true; Main.dust[deathDust2].velocity *= 5f; - deathDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f); + deathDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f); Main.dust[deathDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/JudgementProj.cs b/Projectiles/Melee/JudgementProj.cs index a6edb0c8b9..49de81f947 100644 --- a/Projectiles/Melee/JudgementProj.cs +++ b/Projectiles/Melee/JudgementProj.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { - int shinyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); + int shinyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); Main.dust[shinyDust].noGravity = true; Main.dust[shinyDust].velocity *= 0.5f; Main.dust[shinyDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/MonstrousKnife.cs b/Projectiles/Melee/MonstrousKnife.cs index 6b502dc6db..8c18155e34 100644 --- a/Projectiles/Melee/MonstrousKnife.cs +++ b/Projectiles/Melee/MonstrousKnife.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Melee { for (int dustIndex = 0; dustIndex < 3; ++dustIndex) { - int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TheDestroyer, 0f, 0f, 100, new Color(), 0.8f); + int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TheDestroyer, 0f, 0f, 100, new Color(), 0.8f); Dust dust = Main.dust[redDust]; dust.noGravity = true; dust.velocity *= 1.2f; diff --git a/Projectiles/Melee/MourningSkull.cs b/Projectiles/Melee/MourningSkull.cs index 3695abd4e9..6eb15bdd7a 100644 --- a/Projectiles/Melee/MourningSkull.cs +++ b/Projectiles/Melee/MourningSkull.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee int npcTracker = (int)Projectile.ai[0]; if (Main.npc[npcTracker].active) { - Vector2 projPos = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projPos = Projectile.Center; float npcXDist = Main.npc[npcTracker].position.X - projPos.X; float npcYDist = Main.npc[npcTracker].position.Y - projPos.Y; float npcDistance = (float)Math.Sqrt((double)(npcXDist * npcXDist + npcYDist * npcYDist)); @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Item10, Projectile.position); for (int i = 0; i < 5; i++) { - int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloody].velocity *= 3f; if (Main.rand.NextBool()) { @@ -144,10 +144,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 10; j++) { - int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); + int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); Main.dust[fiery].noGravity = true; Main.dust[fiery].velocity *= 5f; - fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[fiery].velocity *= 2f; } } diff --git a/Projectiles/Melee/Nebudust.cs b/Projectiles/Melee/Nebudust.cs index 92ac7daf15..4d74002b3b 100644 --- a/Projectiles/Melee/Nebudust.cs +++ b/Projectiles/Melee/Nebudust.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando5 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int astra = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Sandnado, 0f, 0f, 100, default, 1f); + int astra = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Sandnado, 0f, 0f, 100, default, 1f); Main.dust[astra].noGravity = true; Main.dust[astra].position.X = Projectile.Center.X; Main.dust[astra].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index cde0ff1802..61149c8250 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Melee whiteLightTimer = 5; } - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.6f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.6f); Main.dust[rainbow].noGravity = true; Main.dust[rainbow].velocity *= 0.5f; Main.dust[rainbow].velocity += Projectile.velocity * 0.1f; @@ -115,10 +115,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 20; j++) { - int deathRainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); + int deathRainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); Main.dust[deathRainbow].noGravity = true; Main.dust[deathRainbow].velocity *= 3f; - deathRainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); + deathRainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); Main.dust[deathRainbow].velocity *= 2f; Main.dust[deathRainbow].noGravity = true; } diff --git a/Projectiles/Melee/OrderbringerRain.cs b/Projectiles/Melee/OrderbringerRain.cs index ce400e5a41..690b46cd4b 100644 --- a/Projectiles/Melee/OrderbringerRain.cs +++ b/Projectiles/Melee/OrderbringerRain.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); Main.dust[rainbow].noGravity = true; Main.dust[rainbow].velocity *= 0.5f; Main.dust[rainbow].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/OrderbringerWhiteOrb.cs b/Projectiles/Melee/OrderbringerWhiteOrb.cs index a27919f36b..10f687be16 100644 --- a/Projectiles/Melee/OrderbringerWhiteOrb.cs +++ b/Projectiles/Melee/OrderbringerWhiteOrb.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee Lighting.AddLight((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16, (float)Main.DiscoR / 200f, (float)Main.DiscoG / 200f, (float)Main.DiscoB / 200f); for (int i = 0; i < 2; i++) { - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); Main.dust[rainbow].noGravity = true; Main.dust[rainbow].velocity *= 0.5f; Main.dust[rainbow].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/PlagueSeeker.cs b/Projectiles/Melee/PlagueSeeker.cs index a256660b82..11487d15cc 100644 --- a/Projectiles/Melee/PlagueSeeker.cs +++ b/Projectiles/Melee/PlagueSeeker.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - int plagued = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 0.75f); + int plagued = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 0.75f); Main.dust[plagued].noGravity = true; Main.dust[plagued].velocity *= 0f; } diff --git a/Projectiles/Melee/PwnagehammerEcho.cs b/Projectiles/Melee/PwnagehammerEcho.cs index 85801bd95b..15a5a6b509 100644 --- a/Projectiles/Melee/PwnagehammerEcho.cs +++ b/Projectiles/Melee/PwnagehammerEcho.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); - Dust dust = Dust.NewDustPerfect(new Vector2(Projectile.position.X, Projectile.position.Y) + offset, DustID.GoldFlame, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); + Dust dust = Dust.NewDustPerfect(Projectile.position + offset, DustID.GoldFlame, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); dust.noGravity = true; } @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); - Dust dust = Dust.NewDustPerfect(new Vector2(Projectile.position.X, Projectile.position.Y) + offset, DustID.GoldFlame, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); + Dust dust = Dust.NewDustPerfect(Projectile.position + offset, DustID.GoldFlame, new Vector2(Projectile.velocity.X * 0.2f + velOffset.X, Projectile.velocity.Y * 0.2f + velOffset.Y), 100, new Color(255, 245, 198), 2f); dust.noGravity = true; } } diff --git a/Projectiles/Melee/RSSolarFlare.cs b/Projectiles/Melee/RSSolarFlare.cs index 1009c39e69..f0ee81e6f6 100644 --- a/Projectiles/Melee/RSSolarFlare.cs +++ b/Projectiles/Melee/RSSolarFlare.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int j = 0; j < 20; j++) { - int shiny = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); + int shiny = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); Main.dust[shiny].velocity *= 3f; if (Main.rand.NextBool()) { @@ -113,10 +113,10 @@ namespace CalamityMod.Projectiles.Melee } for (int k = 0; k < 35; k++) { - int shiny2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1f); + int shiny2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1f); Main.dust[shiny2].noGravity = true; Main.dust[shiny2].velocity *= 5f; - shiny2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); + shiny2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); Main.dust[shiny2].velocity *= 2f; } } diff --git a/Projectiles/Melee/RainBolt.cs b/Projectiles/Melee/RainBolt.cs index f5dac61a82..86a38e025f 100644 --- a/Projectiles/Melee/RainBolt.cs +++ b/Projectiles/Melee/RainBolt.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; } - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2f); Main.dust[rainbow].noGravity = true; Main.dust[rainbow].velocity *= 0f; diff --git a/Projectiles/Melee/RainbowBoom.cs b/Projectiles/Melee/RainbowBoom.cs index bb7eda7abd..504a9b0f49 100644 --- a/Projectiles/Melee/RainbowBoom.cs +++ b/Projectiles/Melee/RainbowBoom.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee randoAdjuster = rando3 / randoAdjuster; rando1 *= randoAdjuster; rando2 *= randoAdjuster; - int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); Main.dust[rainbow].noGravity = true; Main.dust[rainbow].position.X = Projectile.Center.X; Main.dust[rainbow].position.Y = Projectile.Center.Y; diff --git a/Projectiles/Melee/Razorwind.cs b/Projectiles/Melee/Razorwind.cs index 1f2fe3a5ac..afd0ea82a5 100644 --- a/Projectiles/Melee/Razorwind.cs +++ b/Projectiles/Melee/Razorwind.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - int blueDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, new Color(53, Main.DiscoG, 255), 2f); + int blueDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, new Color(53, Main.DiscoG, 255), 2f); Main.dust[blueDust].noGravity = true; Main.dust[blueDust].velocity *= 0f; } diff --git a/Projectiles/Melee/SandFire.cs b/Projectiles/Melee/SandFire.cs index cd27f4dde9..2b616e1f94 100644 --- a/Projectiles/Melee/SandFire.cs +++ b/Projectiles/Melee/SandFire.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 5; i++) { - int shiny = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); + int shiny = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Teleporter, 0f, 0f, 100, default, 0.5f); Main.dust[shiny].noGravity = true; Main.dust[shiny].velocity *= 0f; } diff --git a/Projectiles/Melee/ScourgeoftheCosmosProj.cs b/Projectiles/Melee/ScourgeoftheCosmosProj.cs index ccc63f4218..d8185d280e 100644 --- a/Projectiles/Melee/ScourgeoftheCosmosProj.cs +++ b/Projectiles/Melee/ScourgeoftheCosmosProj.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 10; i = inc + 1) { int dustType = Main.rand.NextBool(3) ? 56 : 242; - int killedDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); + int killedDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[killedDust]; dust.scale *= 1.1f; Main.dust[killedDust].noGravity = true; @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee for (int j = 0; j < 15; j = inc + 1) { int dustType = Main.rand.NextBool(3) ? 56 : 242; - int killedDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); + int killedDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[killedDust2]; dust.velocity *= 2.5f; dust = Main.dust[killedDust2]; diff --git a/Projectiles/Melee/SoulScytheExplosion.cs b/Projectiles/Melee/SoulScytheExplosion.cs index 70fb60084f..4e59925bfe 100644 --- a/Projectiles/Melee/SoulScytheExplosion.cs +++ b/Projectiles/Melee/SoulScytheExplosion.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 30; i++) { - int soulDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + int soulDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[soulDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -41,10 +41,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 50; j++) { - int soulDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); + int soulDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); Main.dust[soulDust2].noGravity = true; Main.dust[soulDust2].velocity *= 5f; - soulDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + soulDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[soulDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/TenebreusTidesWaterSpear.cs b/Projectiles/Melee/TenebreusTidesWaterSpear.cs index 84c6e18363..0734418b29 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSpear.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSpear.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 7f) { - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(3)) { - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/TenebreusTidesWaterSword.cs b/Projectiles/Melee/TenebreusTidesWaterSword.cs index c4f778e13c..f40148f3f6 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSword.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSword.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 7f) { - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(3)) { - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/TerrorBlast.cs b/Projectiles/Melee/TerrorBlast.cs index e3425a66f6..2352264195 100644 --- a/Projectiles/Melee/TerrorBlast.cs +++ b/Projectiles/Melee/TerrorBlast.cs @@ -38,14 +38,14 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 6; i++) - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); for (int i = 0; i < 60; i++) { - int scaryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); + int scaryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f); Main.dust[scaryDust].noGravity = true; Main.dust[scaryDust].velocity *= 3f; - scaryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); + scaryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f); Main.dust[scaryDust].velocity *= 2f; Main.dust[scaryDust].noGravity = true; } diff --git a/Projectiles/Melee/TriactisHammerProj.cs b/Projectiles/Melee/TriactisHammerProj.cs index 861301c414..37c79c6c07 100644 --- a/Projectiles/Melee/TriactisHammerProj.cs +++ b/Projectiles/Melee/TriactisHammerProj.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int i = 0; i < 40; i++) { - int triactisDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); + int triactisDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); Main.dust[triactisDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -121,10 +121,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 70; j++) { - int triactisDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 3f); + int triactisDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 3f); Main.dust[triactisDust2].noGravity = true; Main.dust[triactisDust2].velocity *= 5f; - triactisDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); + triactisDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); Main.dust[triactisDust2].velocity *= 2f; } } @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int i = 0; i < 40; i++) { - int triactisDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); + int triactisDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); Main.dust[triactisDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -146,10 +146,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 70; j++) { - int triactisDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 3f); + int triactisDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 3f); Main.dust[triactisDust2].noGravity = true; Main.dust[triactisDust2].velocity *= 5f; - triactisDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); + triactisDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool() ? 89 : 229, 0f, 0f, 100, default, 2f); Main.dust[triactisDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/TumbleweedFlail.cs b/Projectiles/Melee/TumbleweedFlail.cs index 04b23164dd..5cb0c81030 100644 --- a/Projectiles/Melee/TumbleweedFlail.cs +++ b/Projectiles/Melee/TumbleweedFlail.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.NPCDeath15, Projectile.position); for (int i = 0; i < 20; i++) { - int tumbleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1.2f); + int tumbleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1.2f); Main.dust[tumbleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -142,10 +142,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 30; j++) { - int tumbleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.7f); + int tumbleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.7f); Main.dust[tumbleDust2].noGravity = true; Main.dust[tumbleDust2].velocity *= 5f; - tumbleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); + tumbleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); Main.dust[tumbleDust2].velocity *= 2f; } if (Projectile.owner == Main.myPlayer) diff --git a/Projectiles/Melee/TumbleweedRolling.cs b/Projectiles/Melee/TumbleweedRolling.cs index 39f3c54f6f..1427231e09 100644 --- a/Projectiles/Melee/TumbleweedRolling.cs +++ b/Projectiles/Melee/TumbleweedRolling.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.NPCDeath15, Projectile.position); for (int i = 0; i < 20; i++) { - int tumbleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1.2f); + int tumbleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1.2f); Main.dust[tumbleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -57,10 +57,10 @@ namespace CalamityMod.Projectiles.Melee } for (int j = 0; j < 30; j++) { - int tumbleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.7f); + int tumbleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.7f); Main.dust[tumbleDust2].noGravity = true; Main.dust[tumbleDust2].velocity *= 5f; - tumbleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); + tumbleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); Main.dust[tumbleDust2].velocity *= 2f; } } diff --git a/Projectiles/Melee/UrchinBallSpike.cs b/Projectiles/Melee/UrchinBallSpike.cs index f6a98f9b18..43487f17d5 100644 --- a/Projectiles/Melee/UrchinBallSpike.cs +++ b/Projectiles/Melee/UrchinBallSpike.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int urchin = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(0, 255, 255), 1f); + int urchin = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(0, 255, 255), 1f); Main.dust[urchin].noGravity = true; Main.dust[urchin].velocity *= 2f; } diff --git a/Projectiles/Melee/VoidTentacle.cs b/Projectiles/Melee/VoidTentacle.cs index eaae2e611f..c5957b4e34 100644 --- a/Projectiles/Melee/VoidTentacle.cs +++ b/Projectiles/Melee/VoidTentacle.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Melee while (i < Projectile.scale * 4f) { int dustID = Main.rand.NextBool(5) ? 199 : 175; - int idx = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); Main.dust[idx].position = (Main.dust[idx].position + Projectile.Center) / 2f; Main.dust[idx].noGravity = true; Main.dust[idx].velocity *= 0.1f; diff --git a/Projectiles/Melee/WhiteOrb.cs b/Projectiles/Melee/WhiteOrb.cs index 22a340c77a..84ae9ebcf4 100644 --- a/Projectiles/Melee/WhiteOrb.cs +++ b/Projectiles/Melee/WhiteOrb.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee Lighting.AddLight(Projectile.Center, 0.2f, 0.2f, 0.2f); for (int i = 0; i < 2; i++) { - int shiny = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); + int shiny = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); Main.dust[shiny].noGravity = true; Main.dust[shiny].velocity *= 0.5f; Main.dust[shiny].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/Whiterain.cs b/Projectiles/Melee/Whiterain.cs index f5fee3ee38..6e7978918c 100644 --- a/Projectiles/Melee/Whiterain.cs +++ b/Projectiles/Melee/Whiterain.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { - int shiny = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); + int shiny = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemDiamond, 0f, 0f, 100, default, 1.25f); Main.dust[shiny].noGravity = true; Main.dust[shiny].velocity *= 0.5f; Main.dust[shiny].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs b/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs index 75648fe5f9..11fbb9e90f 100644 --- a/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs +++ b/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Dust.NewDust(Projectile.Center + new Vector2(-25f, -25f), 50, 50, DustID.Enchanted_Pink, 0f, 0f, 150, default(Color), 1.2f); if (Main.rand.NextBool(10)) - Gore.NewGore(Projectile.GetSource_FromAI(), new Vector2(Projectile.position.X, Projectile.position.Y), default(Vector2), Main.rand.Next(16, 18)); + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, default(Vector2), Main.rand.Next(16, 18)); } // Hitbox is larger than normal while trying to hit NPCs diff --git a/Projectiles/Pets/Bear.cs b/Projectiles/Pets/Bear.cs index 72e87b095c..b07928bc79 100644 --- a/Projectiles/Pets/Bear.cs +++ b/Projectiles/Pets/Bear.cs @@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.Pets { float flyingSpeed = 0.3f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertiPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/BrimlingPet.cs b/Projectiles/Pets/BrimlingPet.cs index 86d9719032..fd95edd8ed 100644 --- a/Projectiles/Pets/BrimlingPet.cs +++ b/Projectiles/Pets/BrimlingPet.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Pets } float flySpeed = 0.5f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/DannyDevitoPet.cs b/Projectiles/Pets/DannyDevitoPet.cs index e73b07017d..43b6b5f3f1 100644 --- a/Projectiles/Pets/DannyDevitoPet.cs +++ b/Projectiles/Pets/DannyDevitoPet.cs @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Pets { float flySpeed = 0.3f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertiPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/EidolonSnail.cs b/Projectiles/Pets/EidolonSnail.cs index 30ea2161d4..5e1e05f16b 100644 --- a/Projectiles/Pets/EidolonSnail.cs +++ b/Projectiles/Pets/EidolonSnail.cs @@ -224,7 +224,7 @@ namespace CalamityMod.Projectiles.Pets { float flySpeed = 0.5f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertiPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/FlakPet.cs b/Projectiles/Pets/FlakPet.cs index fbd3f2601c..2f60ed8740 100644 --- a/Projectiles/Pets/FlakPet.cs +++ b/Projectiles/Pets/FlakPet.cs @@ -173,7 +173,7 @@ namespace CalamityMod.Projectiles.Pets { float flySpeed = 0.3f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertiPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/KendraPet.cs b/Projectiles/Pets/KendraPet.cs index 8364c00d73..ed8a8cb9aa 100644 --- a/Projectiles/Pets/KendraPet.cs +++ b/Projectiles/Pets/KendraPet.cs @@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.Pets { float flySpeed = 0.3f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; vertiPos += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Pets/Sparks.cs b/Projectiles/Pets/Sparks.cs index 175ece59b5..2de5ffba80 100644 --- a/Projectiles/Pets/Sparks.cs +++ b/Projectiles/Pets/Sparks.cs @@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Pets } float flySpeed = 0.5f; Projectile.tileCollide = false; - Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 flyDirection = Projectile.Center; float xDist = player.position.X + (float)(player.width / 2) - flyDirection.X; float yDist = player.position.Y + (float)(player.height / 2) - flyDirection.Y; yDist += (float)Main.rand.Next(-10, 21); diff --git a/Projectiles/Ranged/AquaBlast.cs b/Projectiles/Ranged/AquaBlast.cs index 940c916794..0397ad3904 100644 --- a/Projectiles/Ranged/AquaBlast.cs +++ b/Projectiles/Ranged/AquaBlast.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 2; i++) { Vector2 dspeed = -Projectile.velocity * Main.rand.NextFloat(0.5f * 0.8f); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity = dspeed; } @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int lol = 0; lol < 10; lol++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1f); } } } diff --git a/Projectiles/Ranged/AquaBlastToxic.cs b/Projectiles/Ranged/AquaBlastToxic.cs index e43fe0b8c9..963152fa75 100644 --- a/Projectiles/Ranged/AquaBlastToxic.cs +++ b/Projectiles/Ranged/AquaBlastToxic.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 2; i++) { Vector2 dspeed = -Projectile.velocity * Main.rand.NextFloat(0.5f * 0.8f); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity = dspeed; } @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int lol = 0; lol < 10; lol++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 1f); } } diff --git a/Projectiles/Ranged/AstralCannonProjectile.cs b/Projectiles/Ranged/AstralCannonProjectile.cs index 8643dc61e3..0ca7ddea5c 100644 --- a/Projectiles/Ranged/AstralCannonProjectile.cs +++ b/Projectiles/Ranged/AstralCannonProjectile.cs @@ -94,14 +94,14 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Zombie103, Projectile.Center); for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); } for (int j = 0; j < 20; j++) { - int orangeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1.5f); + int orangeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1.5f); Main.dust[orangeDust].noGravity = true; Main.dust[orangeDust].velocity *= 3f; - orangeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); + orangeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 50, default, 1f); Main.dust[orangeDust].velocity *= 2f; Main.dust[orangeDust].noGravity = true; } diff --git a/Projectiles/Ranged/AstrealFlame.cs b/Projectiles/Ranged/AstrealFlame.cs index 1c9e8e6dd2..6f2f999565 100644 --- a/Projectiles/Ranged/AstrealFlame.cs +++ b/Projectiles/Ranged/AstrealFlame.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -65,10 +65,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int j = 0; j < 15; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Ranged/BigCoral.cs b/Projectiles/Ranged/BigCoral.cs index 084c23c189..0971849fd6 100644 --- a/Projectiles/Ranged/BigCoral.cs +++ b/Projectiles/Ranged/BigCoral.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SnowBlock, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(234, 183, 100), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SnowBlock, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(234, 183, 100), 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 3f; } diff --git a/Projectiles/Ranged/BlissfulBombardierDustProjectile.cs b/Projectiles/Ranged/BlissfulBombardierDustProjectile.cs index 115aa19d68..c153a7acbc 100644 --- a/Projectiles/Ranged/BlissfulBombardierDustProjectile.cs +++ b/Projectiles/Ranged/BlissfulBombardierDustProjectile.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[dusty]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/CardClub.cs b/Projectiles/Ranged/CardClub.cs index d9bf37e1cd..91aaec67ac 100644 --- a/Projectiles/Ranged/CardClub.cs +++ b/Projectiles/Ranged/CardClub.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.spriteDirection = Projectile.direction; if (Main.rand.NextBool()) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Ranged/CardClubSplit.cs b/Projectiles/Ranged/CardClubSplit.cs index 4eb33b4599..928c15967d 100644 --- a/Projectiles/Ranged/CardClubSplit.cs +++ b/Projectiles/Ranged/CardClubSplit.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.spriteDirection = Projectile.direction; if (Main.rand.NextBool()) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Ranged/CardHeart.cs b/Projectiles/Ranged/CardHeart.cs index 46dd3b8bcc..da83907400 100644 --- a/Projectiles/Ranged/CardHeart.cs +++ b/Projectiles/Ranged/CardHeart.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.spriteDirection = Projectile.direction; if (Main.rand.NextBool()) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Ranged/CardSpade.cs b/Projectiles/Ranged/CardSpade.cs index 8feb3d69a9..4e9861bb9d 100644 --- a/Projectiles/Ranged/CardSpade.cs +++ b/Projectiles/Ranged/CardSpade.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.spriteDirection = Projectile.direction; if (Main.rand.NextBool()) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, DustID.Web, 0f, 0f, 0, default, 0.5f); Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Ranged/ChickenRocket.cs b/Projectiles/Ranged/ChickenRocket.cs index eb6187549f..60ac94fae2 100644 --- a/Projectiles/Ranged/ChickenRocket.cs +++ b/Projectiles/Ranged/ChickenRocket.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); for (int i = 0; i < 40; i++) { - int d = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 2f); + int d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 2f); Main.dust[d].velocity *= 3f; if (Main.rand.NextBool()) { @@ -106,10 +106,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int i = 0; i < 70; i++) { - int d = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); + int d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); Main.dust[d].noGravity = true; Main.dust[d].velocity *= 5f; - d = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[d].velocity *= 2f; } } diff --git a/Projectiles/Ranged/ContagionBall.cs b/Projectiles/Ranged/ContagionBall.cs index da46854ae1..7b8798c7be 100644 --- a/Projectiles/Ranged/ContagionBall.cs +++ b/Projectiles/Ranged/ContagionBall.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.localNPCHitCooldown = 10; Projectile.Damage(); SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.JungleSpore, 0f, 0f, 100, default, 0.15f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.JungleSpore, 0f, 0f, 100, default, 0.15f); Main.dust[dust].velocity *= 1.2f; if (Main.rand.NextBool()) { diff --git a/Projectiles/Ranged/DaemonsFlameArrow.cs b/Projectiles/Ranged/DaemonsFlameArrow.cs index 3ea241018f..2d03ecc83d 100644 --- a/Projectiles/Ranged/DaemonsFlameArrow.cs +++ b/Projectiles/Ranged/DaemonsFlameArrow.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -79,10 +79,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int j = 0; j < 20; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Ranged/FeatherLarge.cs b/Projectiles/Ranged/FeatherLarge.cs index 1cc2c3dccf..10c5407ce5 100644 --- a/Projectiles/Ranged/FeatherLarge.cs +++ b/Projectiles/Ranged/FeatherLarge.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged int inc; for (int i = 0; i < 10; i = inc + 1) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Harpy, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Harpy, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 1f); inc = i; } } diff --git a/Projectiles/Ranged/FishronRPG.cs b/Projectiles/Ranged/FishronRPG.cs index 092ee0800d..9777f8ea95 100644 --- a/Projectiles/Ranged/FishronRPG.cs +++ b/Projectiles/Ranged/FishronRPG.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item92, Projectile.position); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -107,10 +107,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int i = 0; i < 20; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 3f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 3f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 5f; - dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[dusty].velocity *= 2f; } } diff --git a/Projectiles/Ranged/Flash.cs b/Projectiles/Ranged/Flash.cs index 3ab3d46ff7..1c2fca754b 100644 --- a/Projectiles/Ranged/Flash.cs +++ b/Projectiles/Ranged/Flash.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int flashDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PortalBoltTrail, 0f, 0f, 100, dustColor, 2f); + int flashDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PortalBoltTrail, 0f, 0f, 100, dustColor, 2f); Dust dust = Main.dust[flashDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/FungiOrb.cs b/Projectiles/Ranged/FungiOrb.cs index 27341674f1..b0917fb7a7 100644 --- a/Projectiles/Ranged/FungiOrb.cs +++ b/Projectiles/Ranged/FungiOrb.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] > 4f) { Vector2 dspeed = -Projectile.velocity * 0.5f; - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity = dspeed; diff --git a/Projectiles/Ranged/FungiOrb2.cs b/Projectiles/Ranged/FungiOrb2.cs index 80474e3254..d98d3f1271 100644 --- a/Projectiles/Ranged/FungiOrb2.cs +++ b/Projectiles/Ranged/FungiOrb2.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] > 4f) { Vector2 dspeed = -Projectile.velocity * 0.5f; - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity = dspeed; } diff --git a/Projectiles/Ranged/KarasawaShot.cs b/Projectiles/Ranged/KarasawaShot.cs index 89584d5576..68a689ae84 100644 --- a/Projectiles/Ranged/KarasawaShot.cs +++ b/Projectiles/Ranged/KarasawaShot.cs @@ -89,14 +89,14 @@ namespace CalamityMod.Projectiles.Ranged dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? dust1 : dust2; - int newDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); + int newDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f); Dust dust = Main.dust[newDust]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.noGravity = true; dust.velocity *= randomDustType == dust2 ? 2f : 4f; - newDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); + newDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f); dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.velocity *= randomDustType == dust2 ? 1.33f : 2.66f; @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Ranged dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); int randomDustType = Main.rand.NextBool() ? dust1 : dust2; - int newDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); + int newDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f); Dust dust = Main.dust[newDust2]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; dust.noGravity = true; diff --git a/Projectiles/Ranged/LeafArrow.cs b/Projectiles/Ranged/LeafArrow.cs index f157b7059e..1ca31f8f8b 100644 --- a/Projectiles/Ranged/LeafArrow.cs +++ b/Projectiles/Ranged/LeafArrow.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.localAI[1] += 1f; for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ChlorophyteWeapon, 0f, 0f, 0, new Color(Main.DiscoR, 203, 103), 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ChlorophyteWeapon, 0f, 0f, 0, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 3f; Main.dust[dust].scale = 1.5f; diff --git a/Projectiles/Ranged/MistArrow.cs b/Projectiles/Ranged/MistArrow.cs index 59cd6047dd..3a8793d764 100644 --- a/Projectiles/Ranged/MistArrow.cs +++ b/Projectiles/Ranged/MistArrow.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] > 4f) { Vector2 dspeed = -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.6f); - int whiteDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, new Color(237, 242, 242, 200), 1.2f); + int whiteDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, new Color(237, 242, 242, 200), 1.2f); Main.dust[whiteDust].noGravity = true; Main.dust[whiteDust].velocity = dspeed; } diff --git a/Projectiles/Ranged/PlagueExplosionFriendly.cs b/Projectiles/Ranged/PlagueExplosionFriendly.cs index f91fc9d3e6..51358b057d 100644 --- a/Projectiles/Ranged/PlagueExplosionFriendly.cs +++ b/Projectiles/Ranged/PlagueExplosionFriendly.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int greenDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 0.5f); + int greenDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemEmerald, 0f, 0f, 100, default, 0.5f); Dust dust = Main.dust[greenDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/PlanarRipperExplosion.cs b/Projectiles/Ranged/PlanarRipperExplosion.cs index e35ebf8373..683b641017 100644 --- a/Projectiles/Ranged/PlanarRipperExplosion.cs +++ b/Projectiles/Ranged/PlanarRipperExplosion.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int boomDustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Firework_Blue, 0f, 0f, 100, default, 0.5f); + int boomDustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Firework_Blue, 0f, 0f, 100, default, 0.5f); Dust dust = Main.dust[boomDustID]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/PlanetaryAnnihilationProj.cs b/Projectiles/Ranged/PlanetaryAnnihilationProj.cs index 67bb1e6dd9..16afcdb0b1 100644 --- a/Projectiles/Ranged/PlanetaryAnnihilationProj.cs +++ b/Projectiles/Ranged/PlanetaryAnnihilationProj.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged dustType = 57; break; } - int addedDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2.2f); + int addedDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2.2f); Main.dust[addedDust].noGravity = true; Main.dust[addedDust].velocity *= 0f; @@ -81,14 +81,14 @@ namespace CalamityMod.Projectiles.Ranged int inc; for (int i = 0; i < 20; i = inc + 1) { - int dustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 200, default, 2.1f); + int dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 200, default, 2.1f); Main.dust[dustID].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; Main.dust[dustID].noGravity = true; Dust dust = Main.dust[dustID]; dust.velocity *= 3f; dust = Main.dust[dustID]; dust.velocity += dustVel * Main.rand.NextFloat(); - dustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.1f); + dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.1f); Main.dust[dustID].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust = Main.dust[dustID]; dust.velocity *= 2f; @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Ranged } for (int j = 0; j < 10; j = inc + 1) { - int dustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f); + int dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f); Main.dust[dustID].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; Main.dust[dustID].noGravity = true; Dust dust = Main.dust[dustID]; diff --git a/Projectiles/Ranged/PlasmaExplosion.cs b/Projectiles/Ranged/PlasmaExplosion.cs index 13b04f4e6a..47b172c2d7 100644 --- a/Projectiles/Ranged/PlasmaExplosion.cs +++ b/Projectiles/Ranged/PlasmaExplosion.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int dustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, Projectile.ai[1] == 1f ? 173 : 221, 0f, 0f, 100, default, 2f); + int dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Projectile.ai[1] == 1f ? 173 : 221, 0f, 0f, 100, default, 2f); Dust dust = Main.dust[dustID]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/RainbowBlast.cs b/Projectiles/Ranged/RainbowBlast.cs index eb7d7295d7..4fe0111b80 100644 --- a/Projectiles/Ranged/RainbowBlast.cs +++ b/Projectiles/Ranged/RainbowBlast.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] > 5f) { Vector2 dspeed = -Projectile.velocity * 0.5f; - int rainbowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, dspeed.X, dspeed.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f); + int rainbowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, dspeed.X, dspeed.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f); Main.dust[rainbowDust].noGravity = true; Main.dust[rainbowDust].velocity = dspeed; } diff --git a/Projectiles/Ranged/SandstormBullet.cs b/Projectiles/Ranged/SandstormBullet.cs index 90d8ab6bf7..73563b62ed 100644 --- a/Projectiles/Ranged/SandstormBullet.cs +++ b/Projectiles/Ranged/SandstormBullet.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.alpha = 0; } - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0f; } diff --git a/Projectiles/Ranged/SeasSearingSecondary.cs b/Projectiles/Ranged/SeasSearingSecondary.cs index de88b1c71e..9fef72d9a7 100644 --- a/Projectiles/Ranged/SeasSearingSecondary.cs +++ b/Projectiles/Ranged/SeasSearingSecondary.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 3; i++) { - int aquaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.FishronWings, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), Projectile.scale); + int aquaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.FishronWings, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), Projectile.scale); Main.dust[aquaDust].noGravity = true; Main.dust[aquaDust].velocity *= 0f; - int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GlowingSnail, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), Projectile.scale); + int waterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GlowingSnail, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), Projectile.scale); Main.dust[waterDust].noGravity = true; Main.dust[waterDust].velocity *= 0f; } diff --git a/Projectiles/Ranged/SepticSkewerBacteria.cs b/Projectiles/Ranged/SepticSkewerBacteria.cs index 69e16aa2ca..b6e487b778 100644 --- a/Projectiles/Ranged/SepticSkewerBacteria.cs +++ b/Projectiles/Ranged/SepticSkewerBacteria.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Ranged { dustType = 46; } - int toxicDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int toxicDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Main.dust[toxicDust].noGravity = true; float scaleAlpha = 1f - (float)Projectile.alpha / 255f; scaleAlpha *= Projectile.scale; diff --git a/Projectiles/Ranged/SepticSkewerHarpoon.cs b/Projectiles/Ranged/SepticSkewerHarpoon.cs index 3762680ed2..1a53547855 100644 --- a/Projectiles/Ranged/SepticSkewerHarpoon.cs +++ b/Projectiles/Ranged/SepticSkewerHarpoon.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.extraUpdates = 3; } - Vector2 halfDist = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 halfDist = Projectile.Center; float xDist = player.position.X + (float)(player.width / 2) - halfDist.X; float yDist = player.position.Y + (float)(player.height / 2) - halfDist.Y; float playerDistance = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); diff --git a/Projectiles/Ranged/Shell.cs b/Projectiles/Ranged/Shell.cs index 1baf8a859d..df5f7620f1 100644 --- a/Projectiles/Ranged/Shell.cs +++ b/Projectiles/Ranged/Shell.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(0, 255, 255), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(0, 255, 255), 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 3f; } diff --git a/Projectiles/Ranged/Shockblast.cs b/Projectiles/Ranged/Shockblast.cs index b2572b75a5..4abaaa0f57 100644 --- a/Projectiles/Ranged/Shockblast.cs +++ b/Projectiles/Ranged/Shockblast.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int shockDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.FrostHydra); + int shockDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.FrostHydra); Dust dust = Main.dust[shockDust]; dust.scale = sizeMultiplier; dust.noGravity = true; diff --git a/Projectiles/Ranged/Sickness.cs b/Projectiles/Ranged/Sickness.cs index 2dca481df1..9507691805 100644 --- a/Projectiles/Ranged/Sickness.cs +++ b/Projectiles/Ranged/Sickness.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Ranged randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int dustID = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 0.5f); + int dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 0.5f); Dust dust = Main.dust[dustID]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Ranged/SlagRound.cs b/Projectiles/Ranged/SlagRound.cs index eaad327cd6..919494bf8b 100644 --- a/Projectiles/Ranged/SlagRound.cs +++ b/Projectiles/Ranged/SlagRound.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] > 4f) { Vector2 dspeed = -Projectile.velocity * 0.7f; - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Sand, 0f, 0f, 100, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity = dspeed; } diff --git a/Projectiles/Ranged/SmallCoral.cs b/Projectiles/Ranged/SmallCoral.cs index a7947a19cb..40f6c0292c 100644 --- a/Projectiles/Ranged/SmallCoral.cs +++ b/Projectiles/Ranged/SmallCoral.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SnowBlock, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(234, 183, 100), 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SnowBlock, Projectile.oldVelocity.X / 4, Projectile.oldVelocity.Y / 4, 0, new Color(234, 183, 100), 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 2f; } diff --git a/Projectiles/Ranged/SputterComet.cs b/Projectiles/Ranged/SputterComet.cs index a6e3923d09..8a519534ad 100644 --- a/Projectiles/Ranged/SputterComet.cs +++ b/Projectiles/Ranged/SputterComet.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged Lighting.AddLight(Projectile.Center, 0.1f, 0.3f, 0.8f); if (Main.rand.NextBool(3)) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, ModContent.DustType(), 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, ModContent.DustType(), 0f, 0f, 0, default, 0.5f); Main.dust[dust].alpha = Projectile.alpha; Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; diff --git a/Projectiles/Ranged/SputterCometBig.cs b/Projectiles/Ranged/SputterCometBig.cs index 420a045ce6..306e29e01d 100644 --- a/Projectiles/Ranged/SputterCometBig.cs +++ b/Projectiles/Ranged/SputterCometBig.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged Lighting.AddLight(Projectile.Center, 0.3f, 0.5f, 0.1f); if (Main.rand.NextBool(3)) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), 1, 1, ModContent.DustType(), 0f, 0f, 0, default, 0.5f); + int dust = Dust.NewDust(Projectile.position, 1, 1, ModContent.DustType(), 0f, 0f, 0, default, 0.5f); Main.dust[dust].alpha = Projectile.alpha; Main.dust[dust].velocity *= 0f; Main.dust[dust].noGravity = true; diff --git a/Projectiles/Ranged/SpykerProj.cs b/Projectiles/Ranged/SpykerProj.cs index 507f110751..34ccd4eba6 100644 --- a/Projectiles/Ranged/SpykerProj.cs +++ b/Projectiles/Ranged/SpykerProj.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 2; i++) { - int poisonDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Poisoned, 0f, 0f, 100, default, 0.75f); + int poisonDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Poisoned, 0f, 0f, 100, default, 0.75f); Main.dust[poisonDust].noGravity = true; Main.dust[poisonDust].velocity *= 0f; } diff --git a/Projectiles/Ranged/StarmageddonStar.cs b/Projectiles/Ranged/StarmageddonStar.cs index f5d92c9847..9ec843f299 100644 --- a/Projectiles/Ranged/StarmageddonStar.cs +++ b/Projectiles/Ranged/StarmageddonStar.cs @@ -183,18 +183,18 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 4; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; } for (int i = 0; i < 30; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 200, default(Color), 3.7f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 200, default(Color), 3.7f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; dust2.velocity *= 3f; - dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); + dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust2 = Main.dust[dust]; dust2.velocity *= 2f; @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 0, default(Color), 2.7f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 0, default(Color), 2.7f); Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; @@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SteampunkSteam, 0f, 0f, 0, default(Color), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SteampunkSteam, 0f, 0f, 0, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; diff --git a/Projectiles/Ranged/StarmageddonStar2.cs b/Projectiles/Ranged/StarmageddonStar2.cs index 7869b75bae..d399233b17 100644 --- a/Projectiles/Ranged/StarmageddonStar2.cs +++ b/Projectiles/Ranged/StarmageddonStar2.cs @@ -183,18 +183,18 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 4; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 100, default(Color), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 100, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; } for (int i = 0; i < 30; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 200, default(Color), 3.7f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 200, default(Color), 3.7f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; dust2.velocity *= 3f; - dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 100, default(Color), 1.5f); + dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 100, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; dust2 = Main.dust[dust]; dust2.velocity *= 2f; @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 0, default(Color), 2.7f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceTorch, 0f, 0f, 0, default(Color), 2.7f); Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; @@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SteampunkSteam, 0f, 0f, 0, default(Color), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SteampunkSteam, 0f, 0f, 0, default(Color), 1.5f); Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; Main.dust[dust].noGravity = true; Dust dust2 = Main.dust[dust]; diff --git a/Projectiles/Ranged/ThePackMinissile.cs b/Projectiles/Ranged/ThePackMinissile.cs index d42dfb9598..74099cefaa 100644 --- a/Projectiles/Ranged/ThePackMinissile.cs +++ b/Projectiles/Ranged/ThePackMinissile.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int i = 0; i < 10; i++) { - int DUST = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1f); + int DUST = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1f); } } diff --git a/Projectiles/Ranged/ThePackMissile.cs b/Projectiles/Ranged/ThePackMissile.cs index 151f13887e..d4792d938f 100644 --- a/Projectiles/Ranged/ThePackMissile.cs +++ b/Projectiles/Ranged/ThePackMissile.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 40; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1.5f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -101,10 +101,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int j = 0; j < 60; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 2f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 2f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1.5f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CrystalPulse2, 0f, 0f, 0, default, 1.5f); Main.dust[dust2].velocity *= 2f; } Projectile.Damage(); diff --git a/Projectiles/Ranged/VoidragonTentacle.cs b/Projectiles/Ranged/VoidragonTentacle.cs index d111f2ea34..cf7887c1db 100644 --- a/Projectiles/Ranged/VoidragonTentacle.cs +++ b/Projectiles/Ranged/VoidragonTentacle.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Ranged int dustAmount = 0; while ((float)dustAmount < Projectile.scale * 10f) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.3f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.3f); Main.dust[dust].position = (Main.dust[dust].position + Projectile.Center) / 2f; Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.1f; diff --git a/Projectiles/Rogue/BallisticPoisonBombSpike.cs b/Projectiles/Rogue/BallisticPoisonBombSpike.cs index 25ed7f1d36..00753344c8 100644 --- a/Projectiles/Rogue/BallisticPoisonBombSpike.cs +++ b/Projectiles/Rogue/BallisticPoisonBombSpike.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localAI[1] += 1f; if (Projectile.localAI[1] > 4f) { - int dustt = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 0.75f); + int dustt = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, default, 0.75f); Main.dust[dustt].noGravity = true; Main.dust[dustt].velocity *= 0f; } @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 2; i++) { - int smoke = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); + int smoke = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); Main.dust[smoke].velocity *= 3f; if (Main.rand.NextBool()) { @@ -68,10 +68,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 2; j++) { - int fire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[fire].velocity *= 2f; } } diff --git a/Projectiles/Rogue/BrackishWater.cs b/Projectiles/Rogue/BrackishWater.cs index e8b4becf00..0a2ef3f6a7 100644 --- a/Projectiles/Rogue/BrackishWater.cs +++ b/Projectiles/Rogue/BrackishWater.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Rogue 33, 89 }); - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1.2f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1.2f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Rogue/BrackishWaterBlast.cs b/Projectiles/Rogue/BrackishWaterBlast.cs index c3086ee82e..e575a3f54a 100644 --- a/Projectiles/Rogue/BrackishWaterBlast.cs +++ b/Projectiles/Rogue/BrackishWaterBlast.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue randomAdjust = random3 / randomAdjust; random1 *= randomAdjust; random2 *= randomAdjust; - int water = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.5f); + int water = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.5f); Dust dust = Main.dust[water]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Rogue/CobaltEnergy.cs b/Projectiles/Rogue/CobaltEnergy.cs index c5f7bc9a90..25be7d7bf9 100644 --- a/Projectiles/Rogue/CobaltEnergy.cs +++ b/Projectiles/Rogue/CobaltEnergy.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int index = 0; index < 2; ++index) { - int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemSapphire, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f); + int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemSapphire, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f); Dust dust = Main.dust[ruby]; dust.noGravity = true; dust.velocity *= 0.3f; @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Dig, Projectile.position); for (int index1 = 0; index1 < 15; ++index1) { - int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemSapphire, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f); + int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemSapphire, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f); Dust dust = Main.dust[ruby]; dust.noGravity = true; dust.scale *= 1.25f; diff --git a/Projectiles/Rogue/ExecutionersBladeProj.cs b/Projectiles/Rogue/ExecutionersBladeProj.cs index f42cd0cb92..b52e8d2ad2 100644 --- a/Projectiles/Rogue/ExecutionersBladeProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeProj.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item74, Projectile.position); for (int i = 0; i < 3; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -95,10 +95,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 5; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs index 715bd26162..40b244acc3 100644 --- a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item74, Projectile.position); for (int i = 0; i < 3; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -65,10 +65,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 5; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/ExplosiveSun.cs b/Projectiles/Rogue/ExplosiveSun.cs index e661490079..ca0e3f46ed 100644 --- a/Projectiles/Rogue/ExplosiveSun.cs +++ b/Projectiles/Rogue/ExplosiveSun.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue } for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 10; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index af373cf025..1bf65658c3 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int num621 = 0; num621 < 8; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f); Main.dust[num622].velocity *= 1f; } } diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index 0ffebe4c1d..a5c96f1dad 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int num621 = 0; num621 < 8; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 1f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 1f); Main.dust[num622].velocity *= 1f; } } diff --git a/Projectiles/Rogue/HeavenfallenEnergy.cs b/Projectiles/Rogue/HeavenfallenEnergy.cs index 1cacfb16bc..970d99845b 100644 --- a/Projectiles/Rogue/HeavenfallenEnergy.cs +++ b/Projectiles/Rogue/HeavenfallenEnergy.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] % 4 == 0) { - coolDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); } else { - coolDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); } Main.dust[coolDust].noGravity = true; Main.dust[coolDust].velocity *= 0.1f; diff --git a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs index bdf37bfe3f..1b8beb43bd 100644 --- a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs +++ b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs @@ -50,13 +50,13 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 2; i++) { - int blueDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + int blueDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[blueDust].noGravity = true; Main.dust[blueDust].velocity *= 0f; } for (int i = 0; i < 2; i++) { - int orangeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + int orangeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[orangeDust].noGravity = true; Main.dust[orangeDust].velocity *= 0f; } @@ -147,13 +147,13 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item10, Projectile.position); for (int i = 0; i < 10; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } for (int i = 0; i < 10; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } diff --git a/Projectiles/Rogue/LeonidCometBig.cs b/Projectiles/Rogue/LeonidCometBig.cs index aa719cefb1..d797ae04f1 100644 --- a/Projectiles/Rogue/LeonidCometBig.cs +++ b/Projectiles/Rogue/LeonidCometBig.cs @@ -56,14 +56,14 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.X -= (float)(Projectile.width / 2); Projectile.position.Y -= (float)(Projectile.height / 2); for (int index = 0; index < 8; ++index) - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0.0f, 0.0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0.0f, 0.0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); for (int index1 = 0; index1 < 32; ++index1) { - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); Dust dust1 = Main.dust[index2]; dust1.noGravity = true; dust1.velocity *= 3f; - int index3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); + int index3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); Dust dust2 = Main.dust[index3]; dust2.velocity *= 2f; dust2.noGravity = true; diff --git a/Projectiles/Rogue/LeonidCometSmall.cs b/Projectiles/Rogue/LeonidCometSmall.cs index 560ae8d345..dca0acd674 100644 --- a/Projectiles/Rogue/LeonidCometSmall.cs +++ b/Projectiles/Rogue/LeonidCometSmall.cs @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item89, Projectile.position); for (int index1 = 0; index1 < 2; ++index1) { - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); Dust dust = Main.dust[index2]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * Projectile.width / 2f; } @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Rogue ModContent.DustType(), ModContent.DustType() }); - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); Dust dust = Main.dust[index2]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * Projectile.width / 2f; dust.noGravity = true; @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Rogue } for (int index1 = 0; index1 < 5; ++index1) { - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); Dust dust = Main.dust[index2]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)Projectile.velocity.ToRotation(), new Vector2()) * Projectile.width / 2f; dust.noGravity = true; diff --git a/Projectiles/Rogue/LeonidProgenitorBombshell.cs b/Projectiles/Rogue/LeonidProgenitorBombshell.cs index 78e85ead72..5e61960c86 100644 --- a/Projectiles/Rogue/LeonidProgenitorBombshell.cs +++ b/Projectiles/Rogue/LeonidProgenitorBombshell.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue ModContent.DustType(), ModContent.DustType() }); - int astral = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 0.8f); + int astral = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 0.8f); Main.dust[astral].noGravity = true; Main.dust[astral].velocity *= 0f; diff --git a/Projectiles/Rogue/LostSoulFriendly.cs b/Projectiles/Rogue/LostSoulFriendly.cs index 0631750d59..8641d91ad2 100644 --- a/Projectiles/Rogue/LostSoulFriendly.cs +++ b/Projectiles/Rogue/LostSoulFriendly.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int j = 0; j <= 10; j++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); } } diff --git a/Projectiles/Rogue/LunarKunaiProj.cs b/Projectiles/Rogue/LunarKunaiProj.cs index 1746a4f658..8b7b39d2d1 100644 --- a/Projectiles/Rogue/LunarKunaiProj.cs +++ b/Projectiles/Rogue/LunarKunaiProj.cs @@ -65,10 +65,10 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 10; for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 0, default, 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 0, default, 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 3f; - dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1f); + dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1f); Main.dust[dust].velocity *= 2f; Main.dust[dust].noGravity = true; } @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int j = 0; j < 5; j++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.LunarOre, 0f, 0f, 100, default, 1f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.LunarOre, 0f, 0f, 100, default, 1f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 1.2f; Main.dust[dusty].velocity -= Projectile.oldVelocity * 0.3f; diff --git a/Projectiles/Rogue/MalachiteBolt.cs b/Projectiles/Rogue/MalachiteBolt.cs index 82dd6a47d6..0417dbb894 100644 --- a/Projectiles/Rogue/MalachiteBolt.cs +++ b/Projectiles/Rogue/MalachiteBolt.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 3; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 0.75f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 0.75f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.Damage(); for (int j = 0; j < 70; j++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -85,10 +85,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 40; k++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust2].velocity *= 2f; } } @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.Damage(); for (int j = 0; j < 70; j++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -117,10 +117,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 40; k++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust2].velocity *= 2f; } } @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int j = 0; j < 7; j++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -144,10 +144,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 3; k++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/MalachiteProj.cs b/Projectiles/Rogue/MalachiteProj.cs index 597a88bd84..f5653839f9 100644 --- a/Projectiles/Rogue/MalachiteProj.cs +++ b/Projectiles/Rogue/MalachiteProj.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int k = 0; k < 3; k++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 0.75f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 0.75f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 7; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -79,10 +79,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 15; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/MeteorFistProj.cs b/Projectiles/Rogue/MeteorFistProj.cs index 2091e8535e..009cbfeda3 100644 --- a/Projectiles/Rogue/MeteorFistProj.cs +++ b/Projectiles/Rogue/MeteorFistProj.cs @@ -49,13 +49,13 @@ namespace CalamityMod.Projectiles.Rogue } else if (Main.rand.NextBool()) { - int fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); + int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); Main.dust[fieryDust].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].noGravity = true; Main.dust[fieryDust].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2)).RotatedBy((double)Projectile.rotation, default) * 1.1f; Main.rand.Next(2); - fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); + fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); Main.dust[fieryDust].scale = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].noGravity = true; Main.dust[fieryDust].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2 - 6)).RotatedBy((double)Projectile.rotation, default) * 1.1f; @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int j = 0; j < 40; j++) { - int boomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); + int boomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); Main.dust[boomDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -94,10 +94,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 70; k++) { - int boomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + int boomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[boomDust2].noGravity = true; Main.dust[boomDust2].velocity *= 5f; - boomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); + boomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); Main.dust[boomDust2].velocity *= 2f; } diff --git a/Projectiles/Rogue/MeteorFistStealth.cs b/Projectiles/Rogue/MeteorFistStealth.cs index f7829ca32b..d7e386cc7f 100644 --- a/Projectiles/Rogue/MeteorFistStealth.cs +++ b/Projectiles/Rogue/MeteorFistStealth.cs @@ -51,13 +51,13 @@ namespace CalamityMod.Projectiles.Rogue } else if (Main.rand.NextBool()) { - int fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); + int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); Main.dust[fieryDust].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].noGravity = true; Main.dust[fieryDust].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2)).RotatedBy((double)Projectile.rotation, default) * 1.1f; Main.rand.Next(2); - fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); + fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 0.5f); Main.dust[fieryDust].scale = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[fieryDust].noGravity = true; Main.dust[fieryDust].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2 - 6)).RotatedBy((double)Projectile.rotation, default) * 1.1f; @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int j = 0; j < 40; j++) { - int boomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); + int boomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); Main.dust[boomDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -95,10 +95,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 70; k++) { - int boomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + int boomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[boomDust2].noGravity = true; Main.dust[boomDust2].velocity *= 5f; - boomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); + boomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); Main.dust[boomDust2].velocity *= 2f; } diff --git a/Projectiles/Rogue/MoltenBlobThrown.cs b/Projectiles/Rogue/MoltenBlobThrown.cs index dfc82282e1..ae0d6d85fb 100644 --- a/Projectiles/Rogue/MoltenBlobThrown.cs +++ b/Projectiles/Rogue/MoltenBlobThrown.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 3; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); if (Main.rand.NextBool()) { Main.dust[dust].scale = 0.5f; @@ -91,9 +91,9 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 5; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); } } } diff --git a/Projectiles/Rogue/RadiantExplosion.cs b/Projectiles/Rogue/RadiantExplosion.cs index ce7a5f2b38..ed8f447e7d 100644 --- a/Projectiles/Rogue/RadiantExplosion.cs +++ b/Projectiles/Rogue/RadiantExplosion.cs @@ -44,13 +44,13 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 5; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } for (int i = 0; i < 5; i++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } diff --git a/Projectiles/Rogue/ReaperProjectile.cs b/Projectiles/Rogue/ReaperProjectile.cs index 22cae4b2ce..fd8bfe5e4e 100644 --- a/Projectiles/Rogue/ReaperProjectile.cs +++ b/Projectiles/Rogue/ReaperProjectile.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -190,10 +190,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 8; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/RegulusEnergy.cs b/Projectiles/Rogue/RegulusEnergy.cs index b09cca068e..e7a56a394b 100644 --- a/Projectiles/Rogue/RegulusEnergy.cs +++ b/Projectiles/Rogue/RegulusEnergy.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] % 4 == 0) { - coolDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); } else { - coolDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); } Main.dust[coolDust].noGravity = true; Main.dust[coolDust].velocity *= 0.1f; diff --git a/Projectiles/Rogue/RegulusRiotProj.cs b/Projectiles/Rogue/RegulusRiotProj.cs index 691617289c..34857952a4 100644 --- a/Projectiles/Rogue/RegulusRiotProj.cs +++ b/Projectiles/Rogue/RegulusRiotProj.cs @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Rogue { float homeSpeed = 24f; float turnMult = 10f; - Vector2 projCenter = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projCenter = Projectile.Center; float xDist = targetCenter.X - projCenter.X; float yDist = targetCenter.Y - projCenter.Y; float totalDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); diff --git a/Projectiles/Rogue/ScarletBlast.cs b/Projectiles/Rogue/ScarletBlast.cs index 62f4c1666d..5a8782ef8c 100644 --- a/Projectiles/Rogue/ScarletBlast.cs +++ b/Projectiles/Rogue/ScarletBlast.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue randomAdjust = random3 / randomAdjust; random1 *= randomAdjust; random2 *= randomAdjust; - int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Firework_Red, 0f, 0f, 100, default, 1.25f); + int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Firework_Red, 0f, 0f, 100, default, 1.25f); Dust dust = Main.dust[redDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Rogue/ShatteredExplosion.cs b/Projectiles/Rogue/ShatteredExplosion.cs index 48033978c0..f5ffc3e384 100644 --- a/Projectiles/Rogue/ShatteredExplosion.cs +++ b/Projectiles/Rogue/ShatteredExplosion.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 5; i++) { - int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1.5f); + int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1.5f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; } diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index a5f0d7b218..1c6ecfe6de 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.active = false; for (int j = 0; j < 8; j++) { - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); Main.dust[dusty].velocity *= 3f; if (Main.rand.NextBool()) { @@ -77,10 +77,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int k = 0; k < 16; k++) { - int dusty2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 3f); + int dusty2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 3f); Main.dust[dusty2].noGravity = true; Main.dust[dusty2].velocity *= 5f; - dusty2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); + dusty2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); Main.dust[dusty2].velocity *= 2f; } } diff --git a/Projectiles/Rogue/SnapClamProj.cs b/Projectiles/Rogue/SnapClamProj.cs index 3d724215dc..f9dfd6d0da 100644 --- a/Projectiles/Rogue/SnapClamProj.cs +++ b/Projectiles/Rogue/SnapClamProj.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(115, 124, 124), 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(115, 124, 124), 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 2f; } diff --git a/Projectiles/Rogue/SnapClamStealth.cs b/Projectiles/Rogue/SnapClamStealth.cs index 5b06ba6161..7e8c16117d 100644 --- a/Projectiles/Rogue/SnapClamStealth.cs +++ b/Projectiles/Rogue/SnapClamStealth.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(115, 124, 124), 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, 0f, 0f, 0, new Color(115, 124, 124), 1f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 2f; } diff --git a/Projectiles/Rogue/SphereBladed.cs b/Projectiles/Rogue/SphereBladed.cs index acc77b0a9d..ba66d6bdc2 100644 --- a/Projectiles/Rogue/SphereBladed.cs +++ b/Projectiles/Rogue/SphereBladed.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Rogue else { float acceleration = 3.2f; - Vector2 vector2 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector2 = Projectile.Center; float xdistance = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - vector2.X; float ydistance = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - vector2.Y; float totalDist = (float)Math.Sqrt((double)(xdistance * xdistance + ydistance * ydistance)); diff --git a/Projectiles/Rogue/SphereBlue.cs b/Projectiles/Rogue/SphereBlue.cs index f0216c4330..ebc771fa14 100644 --- a/Projectiles/Rogue/SphereBlue.cs +++ b/Projectiles/Rogue/SphereBlue.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue 226, 229 }); - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f); Main.dust[dusty].noGravity = true; Main.dust[dusty].velocity *= 0f; } diff --git a/Projectiles/Rogue/SupernovaHoming.cs b/Projectiles/Rogue/SupernovaHoming.cs index 73b35dfa5b..f7a3947727 100644 --- a/Projectiles/Rogue/SupernovaHoming.cs +++ b/Projectiles/Rogue/SupernovaHoming.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ai[0] += 1; if (Projectile.ai[0] % 2 == 0) { - int coolDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 28, Projectile.height - 28, dustType, 0f, 0f, 100, default, 1.5f); + int coolDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, dustType, 0f, 0f, 100, default, 1.5f); Main.dust[coolDust].noGravity = true; Main.dust[coolDust].velocity *= 0.1f; Main.dust[coolDust].velocity += Projectile.velocity * 0.5f; diff --git a/Projectiles/Rogue/SupernovaSpike.cs b/Projectiles/Rogue/SupernovaSpike.cs index 9af6c3321e..4b2c4feabe 100644 --- a/Projectiles/Rogue/SupernovaSpike.cs +++ b/Projectiles/Rogue/SupernovaSpike.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localAI[1] += 1f; if (Projectile.localAI[1] > 4f) { - int theDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 0.75f); + int theDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 0.75f); Main.dust[theDust].noGravity = true; Main.dust[theDust].velocity *= 0f; } @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue } for (int i = 0; i < 2; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -111,10 +111,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int j = 0; j < 2; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index 3c1eee840a..c30300397a 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Summon randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int astralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + int astralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); Dust dust = Main.dust[astralDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Summon/BrimstoneExplosionMinion.cs b/Projectiles/Summon/BrimstoneExplosionMinion.cs index d600367402..c9c5c3e6cc 100644 --- a/Projectiles/Summon/BrimstoneExplosionMinion.cs +++ b/Projectiles/Summon/BrimstoneExplosionMinion.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Summon randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[brimDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Summon/BrimstoneFireSummon.cs b/Projectiles/Summon/BrimstoneFireSummon.cs index f9353b9175..166873d105 100644 --- a/Projectiles/Summon/BrimstoneFireSummon.cs +++ b/Projectiles/Summon/BrimstoneFireSummon.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Summon int dustType = (int)CalamityDusts.Brimstone; if (Main.rand.NextBool()) { - int brim = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int brim = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[brim]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Summon/BrimstoneFireballMinion.cs b/Projectiles/Summon/BrimstoneFireballMinion.cs index b4a7fbd95d..b547525944 100644 --- a/Projectiles/Summon/BrimstoneFireballMinion.cs +++ b/Projectiles/Summon/BrimstoneFireballMinion.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi) - MathHelper.ToRadians(90) * Projectile.direction; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); Main.dust[brimDust].noGravity = true; Main.dust[brimDust].velocity *= 0.5f; Main.dust[brimDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Summon/CausticStaffSummon.cs b/Projectiles/Summon/CausticStaffSummon.cs index 95439939af..41f4126702 100644 --- a/Projectiles/Summon/CausticStaffSummon.cs +++ b/Projectiles/Summon/CausticStaffSummon.cs @@ -228,7 +228,7 @@ namespace CalamityMod.Projectiles.Summon //Occasionally spawn fiery dust if (Main.rand.NextBool(6)) { - int fire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(), 2f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, new Color(), 2f); Main.dust[fire].velocity *= 0.3f; Main.dust[fire].noGravity = true; Main.dust[fire].noLight = true; diff --git a/Projectiles/Summon/CosmicBlast.cs b/Projectiles/Summon/CosmicBlast.cs index e0e5cb720b..27e69e8884 100644 --- a/Projectiles/Summon/CosmicBlast.cs +++ b/Projectiles/Summon/CosmicBlast.cs @@ -86,15 +86,15 @@ namespace CalamityMod.Projectiles.Summon SoundEngine.PlaySound(SoundID.Zombie103, Projectile.Center); for (int i = 0; i < 3; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); Main.dust[dust].noGravity = true; } for (int j = 0; j < 30; j++) { - int rainbowDusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); + int rainbowDusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); Main.dust[rainbowDusty].noGravity = true; Main.dust[rainbowDusty].velocity *= 3f; - rainbowDusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); + rainbowDusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); Main.dust[rainbowDusty].velocity *= 2f; Main.dust[rainbowDusty].noGravity = true; } diff --git a/Projectiles/Summon/CosmicBlastBig.cs b/Projectiles/Summon/CosmicBlastBig.cs index 6425e24feb..46cafc7536 100644 --- a/Projectiles/Summon/CosmicBlastBig.cs +++ b/Projectiles/Summon/CosmicBlastBig.cs @@ -92,15 +92,15 @@ namespace CalamityMod.Projectiles.Summon SoundEngine.PlaySound(SoundID.Zombie103, Projectile.Center); for (int i = 0; i < 3; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); Main.dust[dust].noGravity = true; } for (int j = 0; j < 30; j++) { - int rainbowDusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); + int rainbowDusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f); Main.dust[rainbowDusty].noGravity = true; Main.dust[rainbowDusty].velocity *= 3f; - rainbowDusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); + rainbowDusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.5f); Main.dust[rainbowDusty].velocity *= 2f; Main.dust[rainbowDusty].noGravity = true; } diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index 28b7921fdc..68aeab7cef 100644 --- a/Projectiles/Summon/DaedalusCrystal.cs +++ b/Projectiles/Summon/DaedalusCrystal.cs @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Summon projY -= Projectile.Center.Y; int projectileType = ModContent.ProjectileType(); float randSpeed = Main.rand.Next(10, 15); //modify the speed the projectile are shot. Lower number = slower projectile. - Vector2 firingDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 firingDirection = Projectile.Center; float projXDirection = projXStore - firingDirection.X; float projYDirection = projYStore - firingDirection.Y; float projSpeed = (float)Math.Sqrt((double)(projXDirection * projXDirection + projYDirection * projYDirection)); diff --git a/Projectiles/Summon/DaedalusCrystalShot.cs b/Projectiles/Summon/DaedalusCrystalShot.cs index b9c0860422..10f72febfa 100644 --- a/Projectiles/Summon/DaedalusCrystalShot.cs +++ b/Projectiles/Summon/DaedalusCrystalShot.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon } for (int num457 = 0; num457 < 5; num457++) { - int daeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); + int daeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); Main.dust[daeDust].noGravity = true; Main.dust[daeDust].velocity *= 0.5f; Main.dust[daeDust].velocity += Projectile.velocity * 0.1f; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Summon SoundEngine.PlaySound(SoundID.Item74, Projectile.position); for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -56,10 +56,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 10; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index 449617a2bf..0152ab7fda 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Summon { returnSpeed = 12f; } - Vector2 playerDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 playerDirection = Projectile.Center; float playerXDist = player.Center.X - playerDirection.X; float playerYDist = player.Center.Y - playerDirection.Y - 60f; float playerDist = (float)Math.Sqrt((double)(playerXDist * playerXDist + playerYDist * playerYDist)); @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[1] == 0f) { float hoverSpeed = 8f; //12 - Vector2 playerDirectionAgain = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 playerDirectionAgain = Projectile.Center; float playerXDistAgain = projX - playerDirectionAgain.X; float playerYDistAgain = projY - playerDirectionAgain.Y; float playerDistAgain = (float)Math.Sqrt((double)(playerXDistAgain * playerXDistAgain + playerYDistAgain * playerYDistAgain)); diff --git a/Projectiles/Summon/EndoFire.cs b/Projectiles/Summon/EndoFire.cs index e142ee82bb..f57a0f69e3 100644 --- a/Projectiles/Summon/EndoFire.cs +++ b/Projectiles/Summon/EndoFire.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon if (Main.rand.NextBool()) { - int endoDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 0.8f); + int endoDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 0.8f); Dust dust = Main.dust[endoDust]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Summon/FlameBlast.cs b/Projectiles/Summon/FlameBlast.cs index 2a2dce7caa..aed0a92082 100644 --- a/Projectiles/Summon/FlameBlast.cs +++ b/Projectiles/Summon/FlameBlast.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -52,10 +52,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 20; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } count += 1f; @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon { for (int k = 0; k < 5; k++) { - int otherDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 0.75f); + int otherDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 0.75f); Main.dust[otherDust].velocity *= 0f; } } diff --git a/Projectiles/Summon/FlameBurst.cs b/Projectiles/Summon/FlameBurst.cs index aa5377d2a6..3ddb9ff483 100644 --- a/Projectiles/Summon/FlameBurst.cs +++ b/Projectiles/Summon/FlameBurst.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -52,10 +52,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 20; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } count += 1f; @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon { for (int k = 0; k < 5; k++) { - int otherDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f); + int otherDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f); Main.dust[otherDust].velocity *= 0f; } } diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs index 6263c0dca4..b590a84261 100644 --- a/Projectiles/Summon/ForbiddenCircletEater.cs +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Summon projY = Projectile.position.Y + (float)(Projectile.height / 2) + Projectile.velocity.Y * 100f; } float projVel = 0.16f; - Vector2 playerDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 playerDirection = Projectile.Center; float playerX = projX - playerDirection.X; float playerY = projY - playerDirection.Y; float playerDist = (float)Math.Sqrt((double)(playerX * playerX + playerY * playerY)); diff --git a/Projectiles/Summon/FrostMistFriendly.cs b/Projectiles/Summon/FrostMistFriendly.cs index ecc428a10e..5cf292cde8 100644 --- a/Projectiles/Summon/FrostMistFriendly.cs +++ b/Projectiles/Summon/FrostMistFriendly.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon { for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { diff --git a/Projectiles/Summon/GhostlyMine.cs b/Projectiles/Summon/GhostlyMine.cs index 0f247c7a9d..bf0743ead8 100644 --- a/Projectiles/Summon/GhostlyMine.cs +++ b/Projectiles/Summon/GhostlyMine.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon { for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -57,10 +57,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 15; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } spawnDust = false; @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Summon SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int i = 0; i < 30; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -97,10 +97,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 60; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Summon/GlacialEmbracePointyThing.cs b/Projectiles/Summon/GlacialEmbracePointyThing.cs index 5f132364d5..287b3c2479 100644 --- a/Projectiles/Summon/GlacialEmbracePointyThing.cs +++ b/Projectiles/Summon/GlacialEmbracePointyThing.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Summon if (target != null) //target found { float projVel = 40f; - Vector2 targetDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 targetDirection = Projectile.Center; float targetX = target.Center.X - targetDirection.X; float targetY = target.Center.Y - targetDirection.Y; float targetDist = (float)Math.Sqrt((double)(targetX * targetX + targetY * targetY)); diff --git a/Projectiles/Summon/HauntedDishes.cs b/Projectiles/Summon/HauntedDishes.cs index cab8fd6b51..4299df1825 100644 --- a/Projectiles/Summon/HauntedDishes.cs +++ b/Projectiles/Summon/HauntedDishes.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Summon conflict1 += 40 * Projectile.minionPos; if (Projectile.localAI[0] > 0f) conflict1 += 500; - Vector2 idleMinionPos = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 idleMinionPos = Projectile.Center; float playerX = player.position.X + (float)(player.width / 2) - idleMinionPos.X; float playerY = player.position.Y + (float)(player.height / 2) - idleMinionPos.Y; float playerDist = (float)Math.Sqrt(playerX * playerX + playerY * playerY); @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Summon if (npcFound && targetIndex >= 0) Projectile.ai[0] = 0f; - Vector2 returningMinionPos = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 returningMinionPos = Projectile.Center; float xDist = player.position.X + (float)(player.width / 2) - returningMinionPos.X; xDist -= (float)(40 * player.direction); if (!npcFound) diff --git a/Projectiles/Summon/IrradiatedAura.cs b/Projectiles/Summon/IrradiatedAura.cs index 101fcd548a..65ca1a55ed 100644 --- a/Projectiles/Summon/IrradiatedAura.cs +++ b/Projectiles/Summon/IrradiatedAura.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Summon } for (int i = 0; i < (Main.rand.NextBool() ? 1 : 2); i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); if (randomDust == 89) { Main.dust[dust].scale *= 0.35f; diff --git a/Projectiles/Summon/LanternFlame.cs b/Projectiles/Summon/LanternFlame.cs index 95e192c1fe..2086d4398e 100644 --- a/Projectiles/Summon/LanternFlame.cs +++ b/Projectiles/Summon/LanternFlame.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.Damage(); for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -76,10 +76,10 @@ namespace CalamityMod.Projectiles.Summon } for (int j = 0; j < 15; j++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 3f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Summon/MiniGuardianDefense.cs b/Projectiles/Summon/MiniGuardianDefense.cs index 20c740b6a7..7f05149aa0 100644 --- a/Projectiles/Summon/MiniGuardianDefense.cs +++ b/Projectiles/Summon/MiniGuardianDefense.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Summon float num543 = playerDestination.X; float num544 = playerDestination.Y; float num550 = 40f; - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num543 - vector43.X; float num552 = num544 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); diff --git a/Projectiles/Summon/MiniGuardianHealer.cs b/Projectiles/Summon/MiniGuardianHealer.cs index 1914be2d98..bd791dc12e 100644 --- a/Projectiles/Summon/MiniGuardianHealer.cs +++ b/Projectiles/Summon/MiniGuardianHealer.cs @@ -284,7 +284,7 @@ namespace CalamityMod.Projectiles.Summon float num543 = playerDestination.X; float num544 = playerDestination.Y; float num550 = 40f; - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num543 - vector43.X; float num552 = num544 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); diff --git a/Projectiles/Summon/PhantomicDagger.cs b/Projectiles/Summon/PhantomicDagger.cs index 7cce36f12b..7ffcd03e5a 100644 --- a/Projectiles/Summon/PhantomicDagger.cs +++ b/Projectiles/Summon/PhantomicDagger.cs @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Summon if (target != null) { float projVel = 40f; - Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 projDirection = Projectile.Center; float targetXDist = target.Center.X - projDirection.X; float targetYDist = target.Center.Y - projDirection.Y; float targetDist = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index c0922c9ac0..9dbe380c6a 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Summon ModContent.ProjectileType() }); float speed = 25f; - Vector2 fireDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 fireDirection = Projectile.Center; float fireXVel = projXStore - fireDirection.X; float fireYVel = projYStore - fireDirection.Y; float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index abca819f7a..e92d656bb6 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -195,14 +195,14 @@ namespace CalamityMod.Projectiles.Summon int dustID = ProvUtils.GetDustID(pscState); for (int num193 = 0; num193 < 6; num193++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, 1.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, 1.5f); } for (int num194 = 0; num194 < 60; num194++) { - int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 0, default, 2.5f); + int num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 0, default, 2.5f); Main.dust[num195].noGravity = true; Main.dust[num195].velocity *= 3f; - num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, 1.5f); + num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, 1.5f); Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } @@ -320,7 +320,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[1] == 0f) { float num550 = 24f; //12 - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num535 - vector43.X; float num552 = num536 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); @@ -395,7 +395,7 @@ namespace CalamityMod.Projectiles.Summon int dust = ProvUtils.GetDustID(pscState); for (int num621 = 0; num621 < 4; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -405,10 +405,10 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < 12; num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num624].velocity *= 2f; } @@ -539,7 +539,7 @@ namespace CalamityMod.Projectiles.Summon int dust = ProvUtils.GetDustID(pscState); for (int num621 = 0; num621 < 4; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -549,10 +549,10 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < 12; num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num624].velocity *= 2f; } @@ -632,7 +632,7 @@ namespace CalamityMod.Projectiles.Summon } float num550 = 40f; - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num535 - vector43.X; float num552 = num536 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); @@ -807,7 +807,7 @@ namespace CalamityMod.Projectiles.Summon int dust = ProvUtils.GetDustID(pscState); for (int num621 = 0; num621 < 4; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -817,10 +817,10 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < 12; num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num624].velocity *= 2f; } @@ -937,7 +937,7 @@ namespace CalamityMod.Projectiles.Summon int dust = ProvUtils.GetDustID(pscState); for (int num621 = 0; num621 < 10; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -947,10 +947,10 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < 15; num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.75f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num624].velocity *= 2f; } } @@ -1078,7 +1078,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft++; Projectile.tileCollide = false; float num550 = 40f; - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num535 - vector43.X; float num552 = num536 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); @@ -1779,7 +1779,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[1] == 0f) { float num550 = 24f; //12 - Vector2 vector43 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 vector43 = Projectile.Center; float num551 = num535 - vector43.X; float num552 = num536 - vector43.Y; float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); @@ -1807,7 +1807,7 @@ namespace CalamityMod.Projectiles.Summon //Ensure that psa's spears are not coloured by night var psc = Projectile.ai[0] > 0f; int pscState = (int)((!Main.dayTime && psc) ? Providence.BossMode.Night : Providence.BossMode.Day); - int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 1f); + int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; handleAI(psc && Projectile.ai[1] > 0f); @@ -1846,7 +1846,7 @@ namespace CalamityMod.Projectiles.Summon int dustID = ProvUtils.GetDustID(pscState); for (int num621 = 0; num621 < 4; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 2f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1856,11 +1856,11 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < (shouldAdjust ? 8 : 12); num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 1.25f : 3f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 1.25f : 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; Main.dust[num624].fadeIn = shouldAdjust ? 0.9f : Main.dust[num624].fadeIn; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 1f : 2f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 1f : 2f); Main.dust[num624].velocity *= 2f; Main.dust[num624].fadeIn = shouldAdjust ? 0.9f : Main.dust[num624].fadeIn; } @@ -2006,14 +2006,14 @@ namespace CalamityMod.Projectiles.Summon int dustID = ProvUtils.GetDustID(pscState); for (int num193 = 0; num193 < 6; num193++) { - Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, Main.dayTime ? 1.5f : 0.5f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, Main.dayTime ? 1.5f : 0.5f); } for (int num194 = 0; num194 < 60; num194++) { - int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 0, default, Main.dayTime ? 2.5f : 0.5f); + int num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 0, default, Main.dayTime ? 2.5f : 0.5f); Main.dust[num195].noGravity = true; Main.dust[num195].velocity *= 3f; - num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, Main.dayTime ? 1.5f : 0.5f); + num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, Main.dayTime ? 1.5f : 0.5f); Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } @@ -2129,7 +2129,7 @@ namespace CalamityMod.Projectiles.Summon for (int num621 = 0; num621 < 4; num621++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool()) { @@ -2139,10 +2139,10 @@ namespace CalamityMod.Projectiles.Summon } for (int num623 = 0; num623 < 12; num623++) { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.5f); + int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 3f : 0.5f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); + num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); Main.dust[num624].velocity *= 2f; } diff --git a/Projectiles/Summon/SakuraBullet.cs b/Projectiles/Summon/SakuraBullet.cs index 9f27f8c3cd..485334b7dd 100644 --- a/Projectiles/Summon/SakuraBullet.cs +++ b/Projectiles/Summon/SakuraBullet.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.velocity = (Projectile.velocity * 20f + moveDirection * 11f) / (21f); } - int pinkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 0.6f); + int pinkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 0.6f); Main.dust[pinkDust].noGravity = true; Main.dust[pinkDust].velocity *= 0.5f; Main.dust[pinkDust].velocity += Projectile.velocity * 0.1f; @@ -97,16 +97,16 @@ namespace CalamityMod.Projectiles.Summon public override void OnKill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item25, Projectile.position); - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 1f); Main.dust[dust].velocity *= 0.5f; if (Main.rand.NextBool()) { Main.dust[dust].scale = 0.5f; Main.dust[dust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 1.4f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 1.4f); Main.dust[dust2].noGravity = true; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 0.8f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PinkFairy, 0f, 0f, 100, default, 0.8f); } } } diff --git a/Projectiles/Summon/VileFeederProjectile.cs b/Projectiles/Summon/VileFeederProjectile.cs index 57aca17153..48e0f26c30 100644 --- a/Projectiles/Summon/VileFeederProjectile.cs +++ b/Projectiles/Summon/VileFeederProjectile.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Summon } float projSpeed = 10f; float XSpeedMod = 0.16f; - Vector2 fireDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 fireDirection = Projectile.Center; float fireXVel = projX - fireDirection.X; float fireYVel = projY - fireDirection.Y; float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); diff --git a/Projectiles/Summon/VoidConcentrationOrb.cs b/Projectiles/Summon/VoidConcentrationOrb.cs index c830967c15..f1f31a7547 100644 --- a/Projectiles/Summon/VoidConcentrationOrb.cs +++ b/Projectiles/Summon/VoidConcentrationOrb.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Summon if (target != null) { float projSpeed = 40f; - Vector2 fireDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 fireDirection = Projectile.Center; float fireXVel = target.Center.X - fireDirection.X; float fireYVel = target.Center.Y - fireDirection.Y; float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); diff --git a/Projectiles/Summon/WaterElementalMinion.cs b/Projectiles/Summon/WaterElementalMinion.cs index 66ba6b0215..5acfa868b6 100644 --- a/Projectiles/Summon/WaterElementalMinion.cs +++ b/Projectiles/Summon/WaterElementalMinion.cs @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Summon projectileType = ModContent.ProjectileType(); } float projVel = Main.rand.Next(12, 20); - Vector2 fireDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + Vector2 fireDirection = Projectile.Center; float fireXVel = projXStore - fireDirection.X; float fireYVel = projYStore - fireDirection.Y; float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); diff --git a/Projectiles/Summon/WaterSpearFriendly.cs b/Projectiles/Summon/WaterSpearFriendly.cs index f30f86ffeb..bc6672e1ee 100644 --- a/Projectiles/Summon/WaterSpearFriendly.cs +++ b/Projectiles/Summon/WaterSpearFriendly.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Summon { for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index 89969d8aae..fed26b266e 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 5; i++) { - int starryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.2f); + int starryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.2f); Main.dust[starryDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -123,10 +123,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int j = 0; j < 5; j++) { - int starryDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.7f); + int starryDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1.7f); Main.dust[starryDust2].noGravity = true; Main.dust[starryDust2].velocity *= 5f; - starryDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + starryDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[starryDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/Projectiles/Typeless/BlazingStarHeal.cs b/Projectiles/Typeless/BlazingStarHeal.cs index 80e5d3a59c..831f43e7b7 100644 --- a/Projectiles/Typeless/BlazingStarHeal.cs +++ b/Projectiles/Typeless/BlazingStarHeal.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); for (int i = 0; i < 5; i++) { - int duster = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + int duster = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[duster].velocity *= 3f; Main.dust[duster].noGravity = true; if (Main.rand.NextBool()) @@ -112,10 +112,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int j = 0; j < 8; j++) { - int duster2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); + int duster2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f); Main.dust[duster2].noGravity = true; Main.dust[duster2].velocity *= 5f; - duster2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + duster2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[duster2].velocity *= 2f; Main.dust[duster2].noGravity = true; } diff --git a/Projectiles/Typeless/BloodBomb.cs b/Projectiles/Typeless/BloodBomb.cs index e5458239b9..a1b97fc5f4 100644 --- a/Projectiles/Typeless/BloodBomb.cs +++ b/Projectiles/Typeless/BloodBomb.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Typeless } for (int j = 0; j < 3; j++) { - int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.2f); + int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.2f); Main.dust[bloody].noGravity = true; Main.dust[bloody].velocity *= 0.5f; Main.dust[bloody].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Typeless/BloodBombExplosion.cs b/Projectiles/Typeless/BloodBombExplosion.cs index 9f5217039c..164a92cc3f 100644 --- a/Projectiles/Typeless/BloodBombExplosion.cs +++ b/Projectiles/Typeless/BloodBombExplosion.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.8f); + int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 1.8f); Dust dust = Main.dust[bloody]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs b/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs index 582509fc44..a5154c74ec 100644 --- a/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs +++ b/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Typeless } for (int i = 0; i < 5; i++) { - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 0.6f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 0.6f); Main.dust[brimDust].noGravity = true; Main.dust[brimDust].velocity *= 0.5f; Main.dust[brimDust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index 7616bf5efe..993585e42d 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -164,13 +164,13 @@ namespace CalamityMod.Projectiles.Typeless Main.dust[crystalDust2].noGravity = true; } Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f); - int paleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); + int paleDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); Main.dust[paleDust].velocity *= 0.1f; Main.dust[paleDust].velocity += Projectile.velocity * 0.5f; Main.dust[paleDust].noGravity = true; if (Main.rand.NextBool(12)) { - int shinyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); + int shinyDust = Dust.NewDust(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); Main.dust[shinyDust].velocity *= 0.25f; Main.dust[shinyDust].velocity += Projectile.velocity * 0.5f; } diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index da2758018b..cb380ed1e0 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -166,13 +166,13 @@ namespace CalamityMod.Projectiles.Typeless Main.dust[crystalDust2].noGravity = true; } Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f); - int paleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); + int paleDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); Main.dust[paleDust].velocity *= 0.1f; Main.dust[paleDust].velocity += Projectile.velocity * 0.5f; Main.dust[paleDust].noGravity = true; if (Main.rand.NextBool(12)) { - int shinyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); + int shinyDust = Dust.NewDust(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); Main.dust[shinyDust].velocity *= 0.25f; Main.dust[shinyDust].velocity += Projectile.velocity * 0.5f; } @@ -221,14 +221,14 @@ namespace CalamityMod.Projectiles.Typeless int dustCount; for (int j = 0; j < 20; j = dustCount + 1) { - int superRandomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, otherDustType, 0f, 0f, 200, default, crystalDust2); + int superRandomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, otherDustType, 0f, 0f, 200, default, crystalDust2); Dust dust = Main.dust[superRandomDust]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 3f; dust.velocity += dustVel * Main.rand.NextFloat(); - superRandomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.6f); + superRandomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.6f); dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.velocity.Y -= 6f; dust.velocity *= 2f; @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Typeless for (int k = 0; k < 10; k = dustCount + 1) { - int palestDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BoneTorch, 0f, 0f, 0, default, 1.5f); + int palestDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BoneTorch, 0f, 0f, 0, default, 1.5f); Main.dust[palestDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; Dust dust = Main.dust[palestDust]; dust.noGravity = true; diff --git a/Projectiles/Typeless/DeepseaBlaze.cs b/Projectiles/Typeless/DeepseaBlaze.cs index 9ec381d64b..d23c7925f4 100644 --- a/Projectiles/Typeless/DeepseaBlaze.cs +++ b/Projectiles/Typeless/DeepseaBlaze.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 1.5f); + int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[fiery]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Typeless/DragonDust.cs b/Projectiles/Typeless/DragonDust.cs index 4a1f6d50ff..9bb257a7d1 100644 --- a/Projectiles/Typeless/DragonDust.cs +++ b/Projectiles/Typeless/DragonDust.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int dragonDuster = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.5f); + int dragonDuster = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.5f); Dust dust = Main.dust[dragonDuster]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Typeless/EmpyreanBlast.cs b/Projectiles/Typeless/EmpyreanBlast.cs index a8811b2a7a..16329b871a 100644 --- a/Projectiles/Typeless/EmpyreanBlast.cs +++ b/Projectiles/Typeless/EmpyreanBlast.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int ourpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 1f); + int ourpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[ourpleDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Typeless/EmpyreanGlob.cs b/Projectiles/Typeless/EmpyreanGlob.cs index 664a123c34..e37baee7dd 100644 --- a/Projectiles/Typeless/EmpyreanGlob.cs +++ b/Projectiles/Typeless/EmpyreanGlob.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { - int ourpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 1f); + int ourpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 1f); Main.dust[ourpleDust].noGravity = true; Main.dust[ourpleDust].velocity *= 0f; } diff --git a/Projectiles/Typeless/EmpyreanMarble.cs b/Projectiles/Typeless/EmpyreanMarble.cs index fc1ace63ed..1b778ace31 100644 --- a/Projectiles/Typeless/EmpyreanMarble.cs +++ b/Projectiles/Typeless/EmpyreanMarble.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { - int ourpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 2f); + int ourpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 2f); Main.dust[ourpleDust].noGravity = true; Main.dust[ourpleDust].velocity *= 0f; CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 7f, 20f); diff --git a/Projectiles/Typeless/EmpyreanStellarDetritus.cs b/Projectiles/Typeless/EmpyreanStellarDetritus.cs index d27b5ccbe4..304e176086 100644 --- a/Projectiles/Typeless/EmpyreanStellarDetritus.cs +++ b/Projectiles/Typeless/EmpyreanStellarDetritus.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { - int ourpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 2f); + int ourpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 2f); Main.dust[ourpleDust].noGravity = true; Main.dust[ourpleDust].velocity *= 0f; } diff --git a/Projectiles/Typeless/GhostlyBolt.cs b/Projectiles/Typeless/GhostlyBolt.cs index b4ce0ae4e3..78889af8fa 100644 --- a/Projectiles/Typeless/GhostlyBolt.cs +++ b/Projectiles/Typeless/GhostlyBolt.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Typeless SoundEngine.PlaySound(SoundID.Item8, Projectile.position); for (int i = 0; i < 40; i++) { - int cursedDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GiantCursedSkullBolt, 0f, 0f, 100, default, 1f); + int cursedDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GiantCursedSkullBolt, 0f, 0f, 100, default, 1f); Main.dust[cursedDust].velocity *= 3f; Main.dust[cursedDust].velocity += Projectile.velocity * 0.75f; Main.dust[cursedDust].scale *= 1.2f; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Typeless { for (int j = 0; j < 3; j++) { - int cursedDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GiantCursedSkullBolt, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); + int cursedDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GiantCursedSkullBolt, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); Main.dust[cursedDust2].velocity *= 0.6f; Main.dust[cursedDust2].scale *= 1.4f; Main.dust[cursedDust2].noGravity = true; diff --git a/Projectiles/Typeless/GodKiller.cs b/Projectiles/Typeless/GodKiller.cs index 03d43cf3b4..638de58148 100644 --- a/Projectiles/Typeless/GodKiller.cs +++ b/Projectiles/Typeless/GodKiller.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Typeless SoundEngine.PlaySound(SoundID.Item89, Projectile.position); for (int j = 0; j < 5; j++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Butterfly, 0f, 0f, 100, default, 1.5f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Butterfly, 0f, 0f, 100, default, 1.5f); Main.dust[dust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -95,10 +95,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int k = 0; k < 10; k++) { - int dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f); Main.dust[dust2].velocity *= 2f; } } diff --git a/Projectiles/Typeless/GoldenGunProj.cs b/Projectiles/Typeless/GoldenGunProj.cs index 586fabab1e..2b00238f0f 100644 --- a/Projectiles/Typeless/GoldenGunProj.cs +++ b/Projectiles/Typeless/GoldenGunProj.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Typeless int inc; for (int k = 0; k < 100; k = inc + 1) { - int deathGoldenDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 75, default, 1.2f); + int deathGoldenDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 75, default, 1.2f); Dust dust = Main.dust[deathGoldenDust]; if (Main.rand.NextBool()) { diff --git a/Projectiles/Typeless/HellfireExplosionFriendly2.cs b/Projectiles/Typeless/HellfireExplosionFriendly2.cs index cc19201e6e..0a824dae70 100644 --- a/Projectiles/Typeless/HellfireExplosionFriendly2.cs +++ b/Projectiles/Typeless/HellfireExplosionFriendly2.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 0.75f); + int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 0.75f); Dust dust = Main.dust[brimDust]; dust.noGravity = true; dust.position.X = Projectile.Center.X; diff --git a/Projectiles/Typeless/HideOfAstrumDeusExplosion.cs b/Projectiles/Typeless/HideOfAstrumDeusExplosion.cs index 9ca635f705..c0612f7f8d 100644 --- a/Projectiles/Typeless/HideOfAstrumDeusExplosion.cs +++ b/Projectiles/Typeless/HideOfAstrumDeusExplosion.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Typeless randAdjust = rand3 / randAdjust; rand1 *= randAdjust; rand2 *= randAdjust; - int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, scale); + int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, scale); Dust dust = Main.dust[dusty]; if (dustType != 173) dust.color = new Color(255, 255, 255, 0); diff --git a/Projectiles/Typeless/HolyExplosion.cs b/Projectiles/Typeless/HolyExplosion.cs index 54b97b7a94..d06747a0b7 100644 --- a/Projectiles/Typeless/HolyExplosion.cs +++ b/Projectiles/Typeless/HolyExplosion.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 20; i++) { - int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -44,10 +44,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int j = 0; j < 40; j++) { - int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); Main.dust[holyDust2].noGravity = true; Main.dust[holyDust2].velocity *= 5f; - holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); Main.dust[holyDust2].velocity *= 2f; } } diff --git a/Projectiles/Typeless/HydrothermalSmoke.cs b/Projectiles/Typeless/HydrothermalSmoke.cs index dc762df3e9..7278015b26 100644 --- a/Projectiles/Typeless/HydrothermalSmoke.cs +++ b/Projectiles/Typeless/HydrothermalSmoke.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Typeless } if (Main.rand.NextBool(4)) { - int fieryDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); + int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); if (Main.rand.NextBool(4)) { Main.dust[fieryDust].scale *= 0.35f; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Typeless Main.dust[fieryDust].velocity *= 0f; } - Vector2 goreVec = new Vector2(Projectile.position.X, Projectile.position.Y); + Vector2 goreVec = Projectile.position; if (Main.rand.NextBool(8) && Main.netMode != NetmodeID.Server) { int smoke = Gore.NewGore(Projectile.GetSource_FromAI(), goreVec, default, Main.rand.Next(375, 378), 0.75f); diff --git a/Projectiles/Typeless/KelvinCatalystStar.cs b/Projectiles/Typeless/KelvinCatalystStar.cs index 14b1d4e13f..184570c27d 100644 --- a/Projectiles/Typeless/KelvinCatalystStar.cs +++ b/Projectiles/Typeless/KelvinCatalystStar.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Typeless if (Main.rand.NextBool(6)) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f); Main.dust[dust].velocity *= 0.3f; Main.dust[dust].noGravity = true; } diff --git a/Projectiles/Typeless/LunicBeam.cs b/Projectiles/Typeless/LunicBeam.cs index fe2742ba49..7908c750c0 100644 --- a/Projectiles/Typeless/LunicBeam.cs +++ b/Projectiles/Typeless/LunicBeam.cs @@ -177,14 +177,14 @@ namespace CalamityMod.Projectiles.Typeless Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.25f / 255f); for (int r = 0; r < 3; r++) { - int moreSolarDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 28, Projectile.height - 28, DustID.SolarFlare, 0f, 0f, 100, default, 1.35f); + int moreSolarDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.SolarFlare, 0f, 0f, 100, default, 1.35f); Main.dust[moreSolarDust].noGravity = true; Main.dust[moreSolarDust].velocity *= 0.1f; Main.dust[moreSolarDust].velocity += Projectile.velocity * 0.5f; } if (Main.rand.NextBool(8)) { - int mostSolarDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - 32, Projectile.height - 32, DustID.SolarFlare, 0f, 0f, 100, default, 1f); + int mostSolarDust = Dust.NewDust(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.SolarFlare, 0f, 0f, 100, default, 1f); Main.dust[mostSolarDust].velocity *= 0.25f; Main.dust[mostSolarDust].noGravity = true; Main.dust[mostSolarDust].velocity += Projectile.velocity * 0.5f; @@ -237,13 +237,13 @@ namespace CalamityMod.Projectiles.Typeless 262, 247 }); - int orangeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, m, 0f, 0f, 200, default, solarDust2); + int orangeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, m, 0f, 0f, 200, default, solarDust2); Dust dust = Main.dust[orangeDust]; dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.noGravity = true; dust.velocity *= 3f; dust.velocity += dustVel * Main.rand.NextFloat(); - orangeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.8f); + orangeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.8f); dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; dust.velocity *= 2f; dust.noGravity = true; @@ -254,7 +254,7 @@ namespace CalamityMod.Projectiles.Typeless } for (int k = 0; k < 20; k = inc + 1) { - int deathSolar = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SolarFlare, 0f, 0f, 0, default, 2f); + int deathSolar = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SolarFlare, 0f, 0f, 0, default, 2f); Dust dust = Main.dust[deathSolar]; dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; dust.noGravity = true; diff --git a/Projectiles/Typeless/PendantProjectile1.cs b/Projectiles/Typeless/PendantProjectile1.cs index a6a0280f74..f04ae59970 100644 --- a/Projectiles/Typeless/PendantProjectile1.cs +++ b/Projectiles/Typeless/PendantProjectile1.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.rotation += Projectile.velocity.X * 1.25f; for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.5f; Main.dust[dust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Typeless/PendantProjectile2.cs b/Projectiles/Typeless/PendantProjectile2.cs index e8efaad350..c50d8c358f 100644 --- a/Projectiles/Typeless/PendantProjectile2.cs +++ b/Projectiles/Typeless/PendantProjectile2.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.rotation += Projectile.velocity.X * 1.25f; for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.5f; Main.dust[dust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Typeless/PendantProjectile3.cs b/Projectiles/Typeless/PendantProjectile3.cs index ae07349754..cf8165e20d 100644 --- a/Projectiles/Typeless/PendantProjectile3.cs +++ b/Projectiles/Typeless/PendantProjectile3.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.rotation += Projectile.velocity.X * 1.25f; for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.5f; Main.dust[dust].velocity += Projectile.velocity * 0.1f; diff --git a/Projectiles/Typeless/PoisonousSeawater.cs b/Projectiles/Typeless/PoisonousSeawater.cs index a355c9a37d..62da40e9d6 100644 --- a/Projectiles/Typeless/PoisonousSeawater.cs +++ b/Projectiles/Typeless/PoisonousSeawater.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Typeless } for (int i = 0; i < 2; i++) { - int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); + int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 1f); if (randomDust == 89) { Main.dust[seaDust].scale *= 0.35f; diff --git a/Projectiles/Typeless/StickyFeatherAero.cs b/Projectiles/Typeless/StickyFeatherAero.cs index db1ef14c4a..ca6585e9d3 100644 --- a/Projectiles/Typeless/StickyFeatherAero.cs +++ b/Projectiles/Typeless/StickyFeatherAero.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int i = 0; i < 15; i++) { - int blueDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f); + int blueDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f); Main.dust[blueDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -53,10 +53,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int j = 0; j < 30; j++) { - int blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f); + int blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f); Main.dust[blueDust2].noGravity = true; Main.dust[blueDust2].velocity *= 5f; - blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f); + blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f); Main.dust[blueDust2].velocity *= 2f; } } From d159bcc2da0720f02b22be050b03d766444113df Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 04:33:04 +0700 Subject: [PATCH 04/10] Position vector optimizations 2 --- NPCs/Abyss/BoxJellyfish.cs | 2 +- NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/AstrumAureus/AstrumAureus.cs | 6 +++--- NPCs/AstrumAureus/AureusSpawn.cs | 12 +++++------ NPCs/AstrumDeus/AstrumDeusBody.cs | 6 +++--- NPCs/AstrumDeus/AstrumDeusHead.cs | 6 +++--- NPCs/AstrumDeus/AstrumDeusTail.cs | 6 +++--- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 6 +++--- NPCs/CalClone/CalamitasClone.cs | 6 +++--- NPCs/CalClone/Cataclysm.cs | 6 +++--- NPCs/CalClone/Catastrophe.cs | 6 +++--- NPCs/CeaselessVoid/CeaselessVoid.cs | 6 +++--- NPCs/Crabulon/Crabulon.cs | 6 +++--- NPCs/Crags/SoulSlurper.cs | 6 +++--- NPCs/Cryogen/Cryogen.cs | 6 +++--- NPCs/Cryogen/CryogenShield.cs | 6 +++--- NPCs/DevourerofGods/CosmicGuardianBody.cs | 10 +++++----- NPCs/DevourerofGods/CosmicGuardianHead.cs | 8 ++++---- NPCs/DevourerofGods/CosmicGuardianTail.cs | 10 +++++----- NPCs/DevourerofGods/DevourerofGodsBody.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsHead.cs | 10 +++++----- NPCs/DevourerofGods/DevourerofGodsTail.cs | 10 +++++----- NPCs/ExoMechs/Apollo/Apollo.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresBody.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 8 ++++---- NPCs/ExoMechs/Artemis/Artemis.cs | 8 ++++---- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 8 ++++---- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 8 ++++---- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 8 ++++---- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 8 ++++---- NPCs/GreatSandShark/GreatSandShark.cs | 12 +++++------ NPCs/HiveMind/HiveMind.cs | 6 +++--- NPCs/Leviathan/Anahita.cs | 4 ++-- NPCs/Leviathan/Leviathan.cs | 6 +++--- NPCs/NormalNPCs/Horse.cs | 8 ++++---- NPCs/OldDuke/OldDukeToothBall.cs | 6 +++--- NPCs/OldDuke/SulphurousSharkron.cs | 6 +++--- NPCs/Perforator/PerforatorHive.cs | 20 +++++++++---------- NPCs/PlagueEnemies/PlaguebringerMiniboss.cs | 6 +++--- .../PlagueHomingMissile.cs | 10 +++++----- NPCs/PlaguebringerGoliath/PlagueMine.cs | 6 +++--- .../PlaguebringerGoliath.cs | 6 +++--- NPCs/Polterghast/PhantomFuckYou.cs | 8 ++++---- NPCs/Polterghast/PolterPhantom.cs | 8 ++++---- NPCs/Polterghast/Polterghast.cs | 20 +++++++++---------- NPCs/Polterghast/PolterghastHook.cs | 2 +- NPCs/Ravager/FlamePillar.cs | 12 +++++------ NPCs/Ravager/RockPillar.cs | 18 ++++++++--------- NPCs/Signus/CosmicMine.cs | 6 +++--- NPCs/Signus/Signus.cs | 6 +++--- NPCs/SlimeGod/SlimeGodCore.cs | 12 +++++------ NPCs/SlimeGod/SplitCrimulanPaladin.cs | 6 +++--- NPCs/SlimeGod/SplitEbonianPaladin.cs | 6 +++--- NPCs/StormWeaver/StormWeaverBody.cs | 12 +++++------ NPCs/StormWeaver/StormWeaverHead.cs | 8 ++++---- NPCs/StormWeaver/StormWeaverTail.cs | 12 +++++------ NPCs/SupremeCalamitas/SepulcherHead.cs | 2 +- NPCs/SupremeCalamitas/SepulcherTail.cs | 6 +++--- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 6 +++--- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 6 +++--- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 6 +++--- NPCs/Yharon/Yharon.cs | 6 +++--- .../Summon/VoidConcentrationBlackhole.cs | 2 +- 66 files changed, 251 insertions(+), 251 deletions(-) diff --git a/NPCs/Abyss/BoxJellyfish.cs b/NPCs/Abyss/BoxJellyfish.cs index 518c88f91d..c0a59b59c8 100644 --- a/NPCs/Abyss/BoxJellyfish.cs +++ b/NPCs/Abyss/BoxJellyfish.cs @@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.Abyss { NPC.TargetClosest(true); float lungeSpeed = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 10f : 8f; - Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 npcPosition = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - npcPosition.X; float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - npcPosition.Y; float targetDistance = (float)Math.Sqrt(targetX * targetX + targetY * targetY); diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 934a7bd519..8b23bec9cf 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Abyss float currentSpeed = speed; float currentTurnSpeed = turnSpeed; - Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentPosition = NPC.Center; if (patrolSpot == Vector2.Zero) patrolSpot = Main.player[NPC.target].Center; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index b280d632f0..a99da6194b 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int r = 0; r < 50; r++) { - int aureusDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int aureusDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[aureusDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -478,10 +478,10 @@ namespace CalamityMod.NPCs.AstrumAureus } for (int s = 0; s < 100; s++) { - int aureusDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); + int aureusDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); Main.dust[aureusDust2].noGravity = true; Main.dust[aureusDust2].velocity *= 5f; - aureusDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); + aureusDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[aureusDust2].velocity *= 2f; } } diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 0e126c99e5..5c44436054 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -172,7 +172,7 @@ namespace CalamityMod.NPCs.AstrumAureus for (int j = 0; j < 10; j++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[dust].velocity *= 1.66f; if (Main.rand.NextBool()) { @@ -184,10 +184,10 @@ namespace CalamityMod.NPCs.AstrumAureus for (int k = 0; k < 20; k++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 2f; - dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[dust].velocity *= 1.33f; Main.dust[dust].noGravity = true; } @@ -357,7 +357,7 @@ namespace CalamityMod.NPCs.AstrumAureus for (int r = 0; r < 30; r++) { - int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[astralDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -369,10 +369,10 @@ namespace CalamityMod.NPCs.AstrumAureus for (int s = 0; s < 60; s++) { - int astralDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); + int astralDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f); Main.dust[astralDust2].noGravity = true; Main.dust[astralDust2].velocity *= 5f; - astralDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + astralDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); Main.dust[astralDust2].velocity *= 2f; Main.dust[astralDust2].noGravity = true; } diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index eb38212ce6..df1beaab43 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 5; i++) { - int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[purpleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -183,10 +183,10 @@ namespace CalamityMod.NPCs.AstrumDeus } for (int j = 0; j < 10; j++) { - int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); + int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); Main.dust[astralDust].noGravity = true; Main.dust[astralDust].velocity *= 5f; - astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); + astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index ba88318bd4..1e2c178a11 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -209,7 +209,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 5; i++) { - int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[purpleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -219,10 +219,10 @@ namespace CalamityMod.NPCs.AstrumDeus } for (int j = 0; j < 10; j++) { - int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); + int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); Main.dust[astralDust].noGravity = true; Main.dust[astralDust].velocity *= 5f; - astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); + astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } } diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 676018a646..3a3a2f1004 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -146,7 +146,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 5; i++) { - int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[purpleDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -156,10 +156,10 @@ namespace CalamityMod.NPCs.AstrumDeus } for (int j = 0; j < 10; j++) { - int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); + int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 3f); Main.dust[astralDust].noGravity = true; Main.dust[astralDust].velocity *= 5f; - astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); + astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } } diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 1db192215a..39e33068b0 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -266,7 +266,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -276,10 +276,10 @@ namespace CalamityMod.NPCs.BrimstoneElemental } for (int j = 0; j < 60; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index f6c5525086..c3c1dd0cbc 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.CalClone NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -282,10 +282,10 @@ namespace CalamityMod.NPCs.CalClone } for (int j = 0; j < 70; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } } diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index 0b00bdc6ab..ccd203c16a 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.CalClone NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -208,10 +208,10 @@ namespace CalamityMod.NPCs.CalClone } for (int j = 0; j < 70; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } } diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index 1ac00cfb92..3c5c52c92a 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.CalClone NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -208,10 +208,10 @@ namespace CalamityMod.NPCs.CalClone } for (int j = 0; j < 70; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } } diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 1f6645692d..8a3a648268 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -291,7 +291,7 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[purpleDust].velocity *= 3f; Main.dust[purpleDust].noGravity = true; if (Main.rand.NextBool()) @@ -302,10 +302,10 @@ namespace CalamityMod.NPCs.CeaselessVoid } for (int j = 0; j < 70; j++) { - int purpleDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int purpleDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[purpleDust2].noGravity = true; Main.dust[purpleDust2].velocity *= 5f; - purpleDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + purpleDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[purpleDust2].noGravity = true; Main.dust[purpleDust2].velocity *= 2f; } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 1d54dbc91c..c22d47736d 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -906,7 +906,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int j = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); + int j = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); Main.dust[j].velocity *= 3f; if (Main.rand.NextBool()) { @@ -916,10 +916,10 @@ namespace CalamityMod.NPCs.Crabulon } for (int k = 0; k < 70; k++) { - int stompDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 3f); + int stompDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 3f); Main.dust[stompDust].noGravity = true; Main.dust[stompDust].velocity *= 5f; - stompDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); + stompDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f); Main.dust[stompDust].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 0193e34739..95fc911a8b 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -336,7 +336,7 @@ namespace CalamityMod.NPCs.Crags NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 10; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -346,10 +346,10 @@ namespace CalamityMod.NPCs.Crags } for (int j = 0; j < 20; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index ad55d8f82a..07e6e30f17 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1315,7 +1315,7 @@ Block: { for (int i = 0; i < 40; i++) { - int icyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); + int icyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); Main.dust[icyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1325,10 +1325,10 @@ Block: } for (int j = 0; j < 70; j++) { - int icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f); + int icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f); Main.dust[icyDust2].noGravity = true; Main.dust[icyDust2].velocity *= 5f; - icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); + icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); Main.dust[icyDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server && !Main.zenithWorld) diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index 1ea4343171..51ceed2e32 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.Cryogen { for (int i = 0; i < 25; i++) { - int icyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); + int icyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); Main.dust[icyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -184,10 +184,10 @@ namespace CalamityMod.NPCs.Cryogen for (int j = 0; j < 50; j++) { - int icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f); + int icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f); Main.dust[icyDust2].noGravity = true; Main.dust[icyDust2].velocity *= 5f; - icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); + icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f); Main.dust[icyDust2].velocity *= 2f; } diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs index e7190dd435..184958c7f5 100644 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ b/NPCs/DevourerofGods/CosmicGuardianBody.cs @@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; - Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentPosition = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); targetX = (int)(targetX / 16f) * 16; @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.DevourerofGods { try { - segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentPosition = NPC.Center; targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 10; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -230,10 +230,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 20; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs index a87e7a8763..72df92eb3b 100644 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ b/NPCs/DevourerofGods/CosmicGuardianHead.cs @@ -187,7 +187,7 @@ namespace CalamityMod.NPCs.DevourerofGods return; } - Vector2 segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentDirection = NPC.Center; float dogHeadX = Main.npc[CalamityGlobalNPC.DoGHead].position.X + (Main.npc[CalamityGlobalNPC.DoGHead].width / 2); float dogHeadY = Main.npc[CalamityGlobalNPC.DoGHead].position.Y + (Main.npc[CalamityGlobalNPC.DoGHead].height / 2); float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f; @@ -424,7 +424,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 15; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -434,10 +434,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 30; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.cs b/NPCs/DevourerofGods/CosmicGuardianTail.cs index 1fd44f0e2b..5d2c622fa4 100644 --- a/NPCs/DevourerofGods/CosmicGuardianTail.cs +++ b/NPCs/DevourerofGods/CosmicGuardianTail.cs @@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; - Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentPosition = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); targetX = (int)(targetX / 16f) * 16; @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.DevourerofGods { try { - segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentPosition = NPC.Center; targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 10; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -222,10 +222,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 20; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 1fb5226174..b77ecc0466 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -522,7 +522,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 10; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -532,10 +532,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 20; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index fe0c84c05d..666beb398f 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -802,7 +802,7 @@ namespace CalamityMod.NPCs.DevourerofGods { for (int l = 0; l < 8; l++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); float dustVelocityYAdd = Math.Abs(Main.dust[dust].velocity.Y) * 0.5f; if (Main.dust[dust].velocity.Y < 0f) Main.dust[dust].velocity.Y = 2f + dustVelocityYAdd; @@ -1891,7 +1891,7 @@ namespace CalamityMod.NPCs.DevourerofGods float speedCopy = speed; float turnSpeedCopy = turnSpeed; - Vector2 npcCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 npcCenter = NPC.Center; float targetX = player.position.X + (player.width / 2); float targetY = player.position.Y + (player.height / 2); int flyYLevel = -1; @@ -2874,7 +2874,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 15; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -2884,10 +2884,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 30; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 1cac86041f..ffcf9c3123 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; } - Vector2 segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentDirection = NPC.Center; float playerXDist = player.position.X + (player.width / 2); float playerYDist = player.position.Y + (player.height / 2); playerXDist = (int)(playerXDist / 16f) * 16; @@ -303,7 +303,7 @@ namespace CalamityMod.NPCs.DevourerofGods { try { - segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentDirection = NPC.Center; playerXDist = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentDirection.X; playerYDist = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentDirection.Y; } @@ -442,7 +442,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 10; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -452,10 +452,10 @@ namespace CalamityMod.NPCs.DevourerofGods } for (int j = 0; j < 20; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 2378e6b1f4..b21243039f 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -1733,7 +1733,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -1745,14 +1745,14 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo { for (int num193 = 0; num193 < 2; num193++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int i = 0; i < 20; i++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 6f12078636..631b09ff53 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -1637,7 +1637,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -1649,14 +1649,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index b5f33cc337..b10fa96e8e 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -661,7 +661,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 1) { @@ -673,14 +673,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 2b6eaf0394..6622b7d54c 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -711,7 +711,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -723,14 +723,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 20d3d990cc..7a649370d7 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -660,7 +660,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -672,14 +672,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index aaa5c83b40..5c2f2b8e2c 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -654,7 +654,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -666,14 +666,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 53edf7dd66..d346637495 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1564,7 +1564,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.soundDelay == 0) { @@ -1576,14 +1576,14 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index f436b20005..d14f1fbf62 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -673,19 +673,19 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int baseDust = vulnerable ? 3 : 1; for (int k = 0; k < baseDust; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.life <= 0) { for (int i = 0; i < 2; i++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 342fbbd659..9b3cdbe77f 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -677,20 +677,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int baseDust = vulnerable ? 3 : 1; for (int k = 0; k < baseDust; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.life <= 0) { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index f11e347359..8ca44fe51a 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -1297,20 +1297,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } for (int k = 0; k < 3; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.life <= 0) { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index b541aedd9e..7b5ea2721a 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -675,20 +675,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int baseDust = vulnerable ? 3 : 1; for (int k = 0; k < baseDust; k++) - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f); if (NPC.life <= 0) { for (int i = 0; i < 2; i++) { - Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int j = 0; j < 20; j++) { - int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[plasmaDust].noGravity = true; Main.dust[plasmaDust].velocity *= 3f; - plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[plasmaDust].velocity *= 2f; Main.dust[plasmaDust].noGravity = true; } diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 2770be3157..3d1673db94 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -428,7 +428,7 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.localAI[0] = -1f; for (int i = 0; i < 25; i++) { - int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Sand, 0f, 0f, 100, default, 2f); + int burrowDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Sand, 0f, 0f, 100, default, 2f); Main.dust[burrowDust].velocity.Y *= 6f; Main.dust[burrowDust].velocity.X *= 3f; if (Main.rand.NextBool()) @@ -439,10 +439,10 @@ namespace CalamityMod.NPCs.GreatSandShark } for (int j = 0; j < 50; j++) { - int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 3f); + int burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 3f); Main.dust[burrowDust2].noGravity = true; Main.dust[burrowDust2].velocity.Y *= 10f; - burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Sandstorm, 0f, 0f, 100, default, 2f); + burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Sandstorm, 0f, 0f, 100, default, 2f); Main.dust[burrowDust2].velocity.X *= 2f; } @@ -653,7 +653,7 @@ IL_6899: { for (int i = 0; i < 50; i++) { - int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int burrowDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[burrowDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -663,10 +663,10 @@ IL_6899: } for (int j = 0; j < 100; j++) { - int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); + int burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[burrowDust2].noGravity = true; Main.dust[burrowDust2].velocity *= 5f; - burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[burrowDust2].velocity *= 2f; } } diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index cad9c74a2c..2e57cf624f 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -1135,7 +1135,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int killDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f); + int killDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f); Main.dust[killDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1145,10 +1145,10 @@ namespace CalamityMod.NPCs.HiveMind } for (int j = 0; j < 70; j++) { - int killDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 3f); + int killDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 3f); Main.dust[killDust2].noGravity = true; Main.dust[killDust2].velocity *= 5f; - killDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f); + killDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f); Main.dust[killDust2].velocity *= 2f; } } diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index d259c74409..d5bae33c23 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -440,7 +440,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.rotation = NPC.velocity.X * 0.02f; NPC.spriteDirection = NPC.direction; - Vector2 anahitaPos = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 anahitaPos = NPC.Center; float playerXDist = player.position.X + (player.width / 2) - anahitaPos.X; float playerYDist = player.position.Y + (player.height / 2) - 200f * NPC.scale - anahitaPos.Y; float playerDistance = (float)Math.Sqrt(playerXDist * playerXDist + playerYDist * playerYDist); @@ -504,7 +504,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.rotation = NPC.velocity.X * 0.02f; Vector2 bubbleSpawnPos = new Vector2(NPC.position.X + (NPC.width / 2) + (15 * NPC.direction * NPC.scale), NPC.position.Y + 30 * NPC.scale); - Vector2 restingPos = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 restingPos = NPC.Center; float restingPlayerXDist = player.position.X + (player.width / 2) - restingPos.X; float restingPlayerYDist = player.position.Y + (player.height / 2) - restingPos.Y; float restingPlayerDistance = (float)Math.Sqrt(restingPlayerXDist * restingPlayerXDist + restingPlayerYDist * restingPlayerYDist); diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index b509ef5470..44d8979e65 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -783,7 +783,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloody].velocity *= 3f; if (Main.rand.NextBool()) { @@ -793,10 +793,10 @@ namespace CalamityMod.NPCs.Leviathan } for (int j = 0; j < 70; j++) { - int bloody2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); + int bloody2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[bloody2].noGravity = true; Main.dust[bloody2].velocity *= 5f; - bloody2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + bloody2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloody2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 5c8e83ef86..45b580ff0a 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int earthDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 2f); + int earthDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 2f); Main.dust[earthDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -143,10 +143,10 @@ namespace CalamityMod.NPCs.NormalNPCs } for (int j = 0; j < 70; j++) { - int earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f); + int earthDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f); Main.dust[earthDust2].noGravity = true; Main.dust[earthDust2].velocity *= 5f; - earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f); + earthDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f); Main.dust[earthDust2].velocity *= 2f; } @@ -244,7 +244,7 @@ namespace CalamityMod.NPCs.NormalNPCs int damage = Main.masterMode ? 18 : Main.expertMode ? 22 : 30; if (Main.netMode != NetmodeID.MultiplayerClient) { - Vector2 projPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 projPosition = NPC.Center; float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - projPosition.X; float absoluteTargetX = Math.Abs(targetXDist) * 0.1f; float targetYDist = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - projPosition.Y - absoluteTargetX; diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index 523ad62c3a..bf297747ac 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.OldDuke for (int i = 0; i < 15; i++) { - int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloody].velocity *= 3f; if (Main.rand.NextBool()) { @@ -261,10 +261,10 @@ namespace CalamityMod.NPCs.OldDuke for (int j = 0; j < 30; j++) { - int toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f); + int toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f); Main.dust[toxicDust].noGravity = true; Main.dust[toxicDust].velocity *= 5f; - toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); + toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); Main.dust[toxicDust].velocity *= 2f; Main.dust[toxicDust].noGravity = true; } diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index e3dd33db55..e0d2298c82 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -303,7 +303,7 @@ namespace CalamityMod.NPCs.OldDuke for (int i = 0; i < 15; i++) { - int toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); + int toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f); Main.dust[toxicDust].velocity.Y *= 6f; Main.dust[toxicDust].velocity.X *= 3f; if (Main.rand.NextBool()) @@ -315,10 +315,10 @@ namespace CalamityMod.NPCs.OldDuke for (int j = 0; j < 30; j++) { - int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); + int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[bloody].noGravity = true; Main.dust[bloody].velocity.Y *= 10f; - bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloody].velocity.X *= 2f; } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index c9014254b2..92c52757ba 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -280,7 +280,7 @@ namespace CalamityMod.NPCs.Perforator for (int i = 0; i < 16; i++) { - int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); + int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); Main.dust[ichorDust].velocity *= 2f; if (Main.rand.NextBool()) { @@ -291,10 +291,10 @@ namespace CalamityMod.NPCs.Perforator for (int j = 0; j < 32; j++) { - int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); + int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); Main.dust[bloodDust].noGravity = true; Main.dust[bloodDust].velocity *= 3f; - bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f); + bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f); Main.dust[bloodDust].velocity *= 2f; } } @@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.Perforator for (int i = 0; i < 32; i++) { - int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); + int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); float dustVelocityYAdd = Math.Abs(Main.dust[ichorDust].velocity.Y) * 0.5f; if (Main.dust[ichorDust].velocity.Y < 0f) Main.dust[ichorDust].velocity.Y = 2f + dustVelocityYAdd; @@ -400,7 +400,7 @@ namespace CalamityMod.NPCs.Perforator for (int i = 0; i < 8; i++) { - int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); + int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f); Main.dust[ichorDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -411,10 +411,10 @@ namespace CalamityMod.NPCs.Perforator for (int j = 0; j < 16; j++) { - int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); + int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f); Main.dust[bloodDust].noGravity = true; Main.dust[bloodDust].velocity *= 5f; - bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f); + bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f); Main.dust[bloodDust].velocity *= 2f; } @@ -641,7 +641,7 @@ namespace CalamityMod.NPCs.Perforator NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[ichorDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -651,10 +651,10 @@ namespace CalamityMod.NPCs.Perforator } for (int j = 0; j < 70; j++) { - int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); + int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[bloodDust].noGravity = true; Main.dust[bloodDust].velocity *= 5f; - bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); + bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloodDust].velocity *= 2f; } } diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index be1894cb73..d403dd897b 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -392,7 +392,7 @@ namespace CalamityMod.NPCs.PlagueEnemies for (int i = 0; i < 40; i++) { - int plagueDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + int plagueDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); Main.dust[plagueDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -403,10 +403,10 @@ namespace CalamityMod.NPCs.PlagueEnemies for (int j = 0; j < 70; j++) { - int plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); + int plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); Main.dust[plagueDust2].noGravity = true; Main.dust[plagueDust2].velocity *= 5f; - plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); Main.dust[plagueDust2].velocity *= 2f; } } diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index a0f39e5e2a..dd170d4dfa 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -82,12 +82,12 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } else if (Main.rand.NextBool(4)) { - int smokyFire2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 0.5f); + int smokyFire2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 0.5f); Main.dust[smokyFire2].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[smokyFire2].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f; Main.dust[smokyFire2].noGravity = true; Main.dust[smokyFire2].position = NPC.Center + new Vector2(0f, (float)(-(float)NPC.height / 2)).RotatedBy((double)NPC.rotation, default) * 1.1f; - smokyFire2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1f); + smokyFire2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1f); Main.dust[smokyFire2].scale = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[smokyFire2].noGravity = true; Main.dust[smokyFire2].position = NPC.Center + new Vector2(0f, (float)(-(float)NPC.height / 2 - 6)).RotatedBy((double)NPC.rotation, default) * 1.1f; @@ -231,7 +231,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 15; i++) { - int greenPlague = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + int greenPlague = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[greenPlague].velocity *= 3f; if (Main.rand.NextBool()) { @@ -242,10 +242,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } for (int j = 0; j < 30; j++) { - int greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); + int greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); Main.dust[greenPlague2].noGravity = true; Main.dust[greenPlague2].velocity *= 5f; - greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[greenPlague2].velocity *= 2f; Main.dust[greenPlague2].noGravity = true; } diff --git a/NPCs/PlaguebringerGoliath/PlagueMine.cs b/NPCs/PlaguebringerGoliath/PlagueMine.cs index 1f6b639fb0..efca4ac339 100644 --- a/NPCs/PlaguebringerGoliath/PlagueMine.cs +++ b/NPCs/PlaguebringerGoliath/PlagueMine.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 15; i++) { - int greenPlague = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + int greenPlague = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[greenPlague].velocity *= 3f; if (Main.rand.NextBool()) { @@ -174,10 +174,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } for (int j = 0; j < 30; j++) { - int greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); + int greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f); Main.dust[greenPlague2].noGravity = true; Main.dust[greenPlague2].velocity *= 5f; - greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); + greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[greenPlague2].velocity *= 2f; Main.dust[greenPlague2].noGravity = true; } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 6967d320cc..2b78a69901 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1220,7 +1220,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath for (int i = 0; i < 40; i++) { - int plagueDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + int plagueDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); Main.dust[plagueDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1231,10 +1231,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath for (int j = 0; j < 70; j++) { - int plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); + int plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); Main.dust[plagueDust2].noGravity = true; Main.dust[plagueDust2].velocity *= 5f; - plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); Main.dust[plagueDust2].velocity *= 2f; } } diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 84dc65fb2c..8856bddc30 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Polterghast for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[dust].noGravity = true; } @@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 2; i++) { - int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); + int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -199,10 +199,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int j = 0; j < 10; j++) { - int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); + int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); Main.dust[ghostDust2].noGravity = true; Main.dust[ghostDust2].velocity *= 5f; - ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); + ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); Main.dust[ghostDust2].velocity *= 2f; } } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 4e948bd9d9..8343504536 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.Polterghast SoundEngine.PlaySound(SoundID.Item125, NPC.Center); for (int i = 0; i < 30; i++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 5f; } @@ -556,7 +556,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 10; i++) { - int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); + int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -566,10 +566,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int j = 0; j < 60; j++) { - int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); + int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f); Main.dust[ghostDust2].noGravity = true; Main.dust[ghostDust2].velocity *= 5f; - ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); + ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f); Main.dust[ghostDust2].velocity *= 2f; } } diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index b9d04d9019..d7f339cba4 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -621,7 +621,7 @@ namespace CalamityMod.NPCs.Polterghast SoundEngine.PlaySound(SoundID.Item125, NPC.Center); for (int i = 0; i < 30; i++) { - int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 5f; } @@ -788,7 +788,7 @@ namespace CalamityMod.NPCs.Polterghast for (int i = 0; i < 10; i++) { - int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); + int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust].velocity *= 3f; Main.dust[ghostDust].noGravity = true; if (Main.rand.NextBool()) @@ -799,10 +799,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int j = 0; j < 30; j++) { - int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[ghostDust2].noGravity = true; Main.dust[ghostDust2].velocity *= 5f; - ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); + ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust2].velocity *= 2f; } } @@ -941,7 +941,7 @@ namespace CalamityMod.NPCs.Polterghast for (int i = 0; i < 10; i++) { - int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); + int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust].velocity *= 3f; Main.dust[ghostDust].noGravity = true; if (Main.rand.NextBool()) @@ -952,10 +952,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int j = 0; j < 30; j++) { - int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[ghostDust2].noGravity = true; Main.dust[ghostDust2].velocity *= 5f; - ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); + ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust2].velocity *= 2f; } } @@ -1319,7 +1319,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 10; i++) { - int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); + int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1329,10 +1329,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int j = 0; j < 60; j++) { - int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[ghostDust2].noGravity = true; Main.dust[ghostDust2].velocity *= 5f; - ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); + ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[ghostDust2].velocity *= 2f; } } diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index d208ecba32..e6b04762ad 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Polterghast Movement(phase2, expertMode, revenge, death, speedBoost, despawnBoost, lifeRatio, tileEnrageMult, player); // Fire projectiles - Vector2 hookPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 hookPosition = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - hookPosition.X; float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - hookPosition.Y; float targetDistance = (float)Math.Sqrt(targetX * targetX + targetY * targetY); diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index d91408d85d..933d5a4a8e 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.Ravager NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 30; i++) { - int iceFlame = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.IceTorch, 0f, 0f, 100, default, 2f); + int iceFlame = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.IceTorch, 0f, 0f, 100, default, 2f); Main.dust[iceFlame].velocity *= 3f; if (Main.rand.NextBool()) { @@ -192,10 +192,10 @@ namespace CalamityMod.NPCs.Ravager } for (int j = 0; j < 30; j++) { - int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); + int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); Main.dust[rockDust].noGravity = true; Main.dust[rockDust].velocity *= 5f; - rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust].velocity *= 2f; } } @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Ravager { for (int i = 0; i < 2; i++) { - int iceFlame = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + int iceFlame = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[iceFlame].velocity *= 3f; if (Main.rand.NextBool()) { @@ -213,10 +213,10 @@ namespace CalamityMod.NPCs.Ravager } for (int j = 0; j < 2; j++) { - int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); + int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); Main.dust[rockDust].noGravity = true; Main.dust[rockDust].velocity *= 5f; - rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust].velocity *= 2f; } } diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index 7f274230b6..7af3541cc5 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.Ravager for (int i = 0; i < 10; i++) { - int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -87,10 +87,10 @@ namespace CalamityMod.NPCs.Ravager } for (int j = 0; j < 10; j++) { - int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); + int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); Main.dust[rockDust2].noGravity = true; Main.dust[rockDust2].velocity *= 5f; - rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust2].velocity *= 2f; } @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Ravager NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 30; i++) { - int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -173,10 +173,10 @@ namespace CalamityMod.NPCs.Ravager } for (int j = 0; j < 30; j++) { - int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); + int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); Main.dust[rockDust2].noGravity = true; Main.dust[rockDust2].velocity *= 5f; - rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust2].velocity *= 2f; } @@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.Ravager { for (int i = 0; i < 2; i++) { - int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -210,10 +210,10 @@ namespace CalamityMod.NPCs.Ravager } for (int j = 0; j < 2; j++) { - int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); + int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f); Main.dust[rockDust2].noGravity = true; Main.dust[rockDust2].velocity *= 5f; - rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); + rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f); Main.dust[rockDust2].velocity *= 2f; } } diff --git a/NPCs/Signus/CosmicMine.cs b/NPCs/Signus/CosmicMine.cs index 0e466f5b0b..948709ecfb 100644 --- a/NPCs/Signus/CosmicMine.cs +++ b/NPCs/Signus/CosmicMine.cs @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.Signus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 10; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -223,10 +223,10 @@ namespace CalamityMod.NPCs.Signus } for (int j = 0; j < 20; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; Main.dust[cosmiliteDust2].noGravity = true; } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index d147dba5a8..997ff5f25a 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -998,7 +998,7 @@ namespace CalamityMod.NPCs.Signus NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int teleportDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int teleportDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[teleportDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -1008,10 +1008,10 @@ namespace CalamityMod.NPCs.Signus } for (int j = 0; j < 60; j++) { - int teleportDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int teleportDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[teleportDust2].noGravity = true; Main.dust[teleportDust2].velocity *= 5f; - teleportDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + teleportDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[teleportDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 5d056efafb..d208410b88 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.SlimeGod { Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson; color.A = 150; - int slimyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); + int slimyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); Main.dust[slimyDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -244,10 +244,10 @@ namespace CalamityMod.NPCs.SlimeGod { Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson; color.A = 150; - int slimyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f); + int slimyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f); Main.dust[slimyDust2].noGravity = true; Main.dust[slimyDust2].velocity *= 5f; - slimyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); + slimyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); Main.dust[slimyDust2].velocity *= 2f; } @@ -372,7 +372,7 @@ namespace CalamityMod.NPCs.SlimeGod { Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson; color.A = 150; - int dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); + int dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); Main.dust[dust2].velocity *= 3f; if (Main.rand.NextBool()) { @@ -384,10 +384,10 @@ namespace CalamityMod.NPCs.SlimeGod { Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson; color.A = 150; - int dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f); + int dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f); Main.dust[dust2].noGravity = true; Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); + dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f); Main.dust[dust2].velocity *= 2f; } } diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index 18522dc08e..bdd9a2ec4c 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -741,7 +741,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int crimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); + int crimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); Main.dust[crimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -751,10 +751,10 @@ namespace CalamityMod.NPCs.SlimeGod } for (int j = 0; j < 70; j++) { - int crimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f); + int crimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f); Main.dust[crimDust2].noGravity = true; Main.dust[crimDust2].velocity *= 5f; - crimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); + crimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); Main.dust[crimDust2].velocity *= 2f; } } diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index e1c22feb9a..ee77e9a283 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -785,7 +785,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int corruptionDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); + int corruptionDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); Main.dust[corruptionDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -795,10 +795,10 @@ namespace CalamityMod.NPCs.SlimeGod } for (int j = 0; j < 70; j++) { - int corruptionDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f); + int corruptionDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f); Main.dust[corruptionDust2].noGravity = true; Main.dust[corruptionDust2].velocity *= 5f; - corruptionDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); + corruptionDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f); Main.dust[corruptionDust2].velocity *= 2f; } } diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index b09a9fc2a5..cbddaba0a0 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int i = 0; i < 2; i++) { - int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); + int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); Main.dust[redDust].noGravity = true; Main.dust[redDust].noLight = true; } @@ -204,7 +204,7 @@ namespace CalamityMod.NPCs.StormWeaver NPC.alpha = 0; } - Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentLocation = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); targetX = (int)(targetX / 16f) * 16; @@ -219,7 +219,7 @@ namespace CalamityMod.NPCs.StormWeaver { try { - segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentLocation = NPC.Center; targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X; targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y; } @@ -352,7 +352,7 @@ namespace CalamityMod.NPCs.StormWeaver for (int i = 0; i < 20; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -363,10 +363,10 @@ namespace CalamityMod.NPCs.StormWeaver for (int j = 0; j < 40; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index d82b2d4e5e..3239bbd167 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int i = 0; i < 2; i++) { - int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); + int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); Main.dust[redDust].noGravity = true; Main.dust[redDust].noLight = true; } @@ -915,7 +915,7 @@ namespace CalamityMod.NPCs.StormWeaver for (int i = 0; i < 20; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -926,10 +926,10 @@ namespace CalamityMod.NPCs.StormWeaver for (int j = 0; j < 40; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 06fbced28e..668878f4ed 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int i = 0; i < 2; i++) { - int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); + int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); Main.dust[redDust].noGravity = true; Main.dust[redDust].noLight = true; } @@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.StormWeaver NPC.alpha = 0; } - Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentLocation = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); targetX = (int)(targetX / 16f) * 16; @@ -215,7 +215,7 @@ namespace CalamityMod.NPCs.StormWeaver { try { - segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentLocation = NPC.Center; targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X; targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y; } @@ -350,7 +350,7 @@ namespace CalamityMod.NPCs.StormWeaver for (int i = 0; i < 20; i++) { - int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -361,10 +361,10 @@ namespace CalamityMod.NPCs.StormWeaver for (int j = 0; j < 40; j++) { - int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); + int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); Main.dust[cosmiliteDust2].noGravity = true; Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); + cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); Main.dust[cosmiliteDust2].velocity *= 2f; } } diff --git a/NPCs/SupremeCalamitas/SepulcherHead.cs b/NPCs/SupremeCalamitas/SepulcherHead.cs index 2031b3eca4..3c0af34437 100644 --- a/NPCs/SupremeCalamitas/SepulcherHead.cs +++ b/NPCs/SupremeCalamitas/SepulcherHead.cs @@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas else NPC.Opacity = MathHelper.Clamp(NPC.Opacity + 0.165f, 0f, 1f); - Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentLocation = NPC.Center; float targetX = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.X + (Main.player[NPC.target].width / 2); float targetY = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.Y + (Main.player[NPC.target].height / 2); float sepMaxSpeed = BossRushEvent.BossRushActive ? 22.5f : 20f; diff --git a/NPCs/SupremeCalamitas/SepulcherTail.cs b/NPCs/SupremeCalamitas/SepulcherTail.cs index 6a840900fd..ba744ca331 100644 --- a/NPCs/SupremeCalamitas/SepulcherTail.cs +++ b/NPCs/SupremeCalamitas/SepulcherTail.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int i = 0; i < 2; i++) { - int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); + int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f); Main.dust[redDust].noGravity = true; Main.dust[redDust].noLight = true; } @@ -108,7 +108,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.alpha = Main.npc[(int)NPC.ai[2]].alpha; } - Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + Vector2 segmentLocation = NPC.Center; float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); targetX = (int)(targetX / 16f) * 16; @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { try { - segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + segmentLocation = NPC.Center; targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X; targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y; } diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index b7952b2b69..b6d4ac8265 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 5; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -242,10 +242,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas } for (int j = 0; j < 10; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index dfcf49539c..9bac800678 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -326,7 +326,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -336,10 +336,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas } for (int j = 0; j < 70; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index 072a29e7b0..94c8295a71 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -320,7 +320,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); for (int i = 0; i < 40; i++) { - int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -330,10 +330,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas } for (int j = 0; j < 70; j++) { - int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[brimDust2].noGravity = true; Main.dust[brimDust2].velocity *= 5f; - brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[brimDust2].velocity *= 2f; } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 08f2fa9881..57d82c93ca 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -3256,7 +3256,7 @@ namespace CalamityMod.NPCs.Yharon NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int i = 0; i < 40; i++) { - int fieryDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + int fieryDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[fieryDust].velocity *= 3f; if (Main.rand.NextBool()) { @@ -3266,10 +3266,10 @@ namespace CalamityMod.NPCs.Yharon } for (int j = 0; j < 70; j++) { - int fieryDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); + int fieryDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); Main.dust[fieryDust2].noGravity = true; Main.dust[fieryDust2].velocity *= 5f; - fieryDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); + fieryDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); Main.dust[fieryDust2].velocity *= 2f; } diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs index 17a32bf493..d579b059d2 100644 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ b/Projectiles/Summon/VoidConcentrationBlackhole.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Summon velocity *= 2f; velocity.SafeNormalize(Vector2.Zero); float projSpeed = 5f * Projectile.scale; - Vector2 fireDirection = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + Vector2 fireDirection = npc.Center; float fireXVel = Projectile.Center.X - fireDirection.X; float fireYVel = Projectile.Center.Y - fireDirection.Y; float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); From 5cb59680ef3e93c77bb4f82897e696148ac36c1f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 09:43:08 +0700 Subject: [PATCH 05/10] ToRotation and stuff --- CalPlayer/CalamityPlayerMiscEffects.cs | 3 +- Items/Accessories/DeepDiver.cs | 2 -- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 2 -- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 -- Particles/NanoParticle.cs | 1 - Projectiles/Boss/ArtemisLaser.cs | 2 +- Projectiles/Boss/AstralFlame.cs | 2 +- Projectiles/Boss/AstralLaser.cs | 2 +- Projectiles/Boss/DoGBeam.cs | 2 +- Projectiles/Boss/GreatSandBlast.cs | 2 +- Projectiles/Boss/HiveBombGoliath.cs | 2 +- Projectiles/Boss/MoltenBlast.cs | 2 +- Projectiles/Boss/PhantomShot.cs | 2 +- Projectiles/Boss/PhantomShot2.cs | 2 +- Projectiles/Boss/ProfanedSpear.cs | 2 +- Projectiles/Boss/SCalBrimstoneFireblast.cs | 4 --- Projectiles/Boss/SCalBrimstoneGigablast.cs | 4 --- Projectiles/Boss/THanosSideLaser.cs | 2 +- Projectiles/Boss/ThanatosLaser.cs | 4 +-- Projectiles/Enemy/PearlBurst.cs | 2 +- Projectiles/Enemy/PearlRain.cs | 2 +- Projectiles/Enemy/SulphuricAcidMist.cs | 2 +- Projectiles/Magic/AcidicSaxMist.cs | 2 +- Projectiles/Magic/AuraRain.cs | 2 +- Projectiles/Magic/BlackAnurianPlankton.cs | 2 +- Projectiles/Magic/BloodBeam.cs | 2 +- Projectiles/Magic/CoralSpike.cs | 2 +- Projectiles/Magic/DivineRetributionSpear.cs | 2 +- Projectiles/Magic/EidolicWailSoundwave.cs | 2 +- Projectiles/Magic/GammaLaser.cs | 2 +- Projectiles/Magic/HellwingPillar.cs | 2 +- Projectiles/Magic/IcicleStaffProj.cs | 2 +- Projectiles/Magic/IonBlast.cs | 2 +- Projectiles/Magic/LuxorsGiftMagic.cs | 2 +- Projectiles/Magic/ManaBoltSmall2.cs | 2 +- Projectiles/Magic/PlagueFang.cs | 2 +- .../SeethingDischargeBrimstoneBarrage.cs | 2 +- .../SeethingDischargeBrimstoneHellblast.cs | 2 +- Projectiles/Magic/SerpentineHead.cs | 2 +- Projectiles/Magic/TradewindsProjectile.cs | 2 +- Projectiles/Magic/UndinesRetributionSpear.cs | 2 +- Projectiles/Magic/VenusianBolt.cs | 2 +- Projectiles/Magic/WaterLeechProj.cs | 2 +- .../Melee/BalefulHarvesterProjectile.cs | 2 +- Projectiles/Melee/BallOFuguProj.cs | 4 +-- Projectiles/Melee/BrimstoneLaserFriendly.cs | 2 +- Projectiles/Melee/BrimstoneSwordProj.cs | 2 +- .../Melee/BrokenBiomeBlade_AridGrandeur.cs | 2 +- .../Melee/BrokenBiomeBlade_DecaysRetort.cs | 4 +-- Projectiles/Melee/ClamCrusherFlail.cs | 4 +-- Projectiles/Melee/CrystylCrusherRay.cs | 4 +-- Projectiles/Melee/EutrophicScimitarProj.cs | 6 ++-- Projectiles/Melee/Feather.cs | 2 +- Projectiles/Melee/Galaxia_AndromedasStride.cs | 2 +- Projectiles/Melee/Galaxia_AriesWrath.cs | 2 +- Projectiles/Melee/Galaxia_PhoenixsPride.cs | 2 +- Projectiles/Melee/Galaxia_PolarisGaze.cs | 2 +- Projectiles/Melee/GalileosPlanet.cs | 2 +- Projectiles/Melee/GelWave.cs | 2 +- Projectiles/Melee/GhastlySoulLarge.cs | 2 +- Projectiles/Melee/GhastlySoulMedium.cs | 2 +- Projectiles/Melee/GhastlySoulSmall.cs | 2 +- Projectiles/Melee/GreenWater.cs | 2 +- .../MendedBiomeBlade_ExtantAbhorrence.cs | 2 +- .../Melee/MendedBiomeBlade_HeavensMight.cs | 2 +- .../MendedBiomeBlade_TrueAridGrandeur.cs | 2 +- .../MendedBiomeBlade_TrueBitingEmbrace.cs | 2 +- .../MendedBiomeBlade_TrueDecaysRetort.cs | 6 ++-- Projectiles/Melee/MirrorBlast.cs | 2 +- Projectiles/Melee/MonstrousKnife.cs | 2 +- Projectiles/Melee/MourningSkull.cs | 4 +-- Projectiles/Melee/OrderbringerBeam.cs | 2 +- Projectiles/Melee/PrismaticWave.cs | 2 +- Projectiles/Melee/ScourgeoftheCosmosProj.cs | 2 +- Projectiles/Melee/SolsticeBeam.cs | 2 +- .../Melee/SpineOfThanatosProjectile.cs | 2 +- Projectiles/Melee/TenebreusTidesWaterSpear.cs | 2 +- Projectiles/Melee/TenebreusTidesWaterSword.cs | 2 +- Projectiles/Melee/TerraSpear.cs | 2 +- Projectiles/Melee/TerrorBeam.cs | 2 +- ...TrueBiomeBlade_LamentationsOfTheChained.cs | 2 +- .../Melee/TrueBiomeBlade_MercurialTides.cs | 2 +- .../Melee/TrueBiomeBlade_SanguineFury.cs | 2 +- .../Melee/TrueBiomeBlade_SwordsmithsPride.cs | 2 +- Projectiles/Melee/TumbleweedFlail.cs | 2 +- Projectiles/Melee/UrchinBall.cs | 4 +-- Projectiles/Melee/UrchinSpikeFugu.cs | 2 +- Projectiles/Melee/VolcanicFireballLarge.cs | 2 +- Projectiles/Melee/YateveoBloomProj.cs | 4 +-- Projectiles/Pets/Sparks.cs | 1 - Projectiles/Ranged/AstralCannonProjectile.cs | 2 +- Projectiles/Ranged/AstrealArrow.cs | 2 +- Projectiles/Ranged/BarinadeArrow.cs | 2 +- Projectiles/Ranged/BoltArrow.cs | 2 +- Projectiles/Ranged/ContagionArrow.cs | 2 +- Projectiles/Ranged/FeatherLarge.cs | 2 +- Projectiles/Ranged/FishronRPG.cs | 2 +- Projectiles/Ranged/LeafArrow.cs | 2 +- Projectiles/Ranged/RainbowFront.cs | 2 +- Projectiles/Ranged/SandstormBullet.cs | 2 +- Projectiles/Ranged/SeasSearingSecondary.cs | 2 +- Projectiles/Ranged/SepticSkewerHarpoon.cs | 4 +-- Projectiles/Ranged/StormSurgeTornado.cs | 2 +- Projectiles/Ranged/TerraArrowMain.cs | 1 - Projectiles/Ranged/TerraBulletSplit.cs | 2 +- Projectiles/Ranged/ThePackMinissile.cs | 2 +- Projectiles/Ranged/ThePackMissile.cs | 2 +- Projectiles/Rogue/AntumbraShardProjectile.cs | 2 +- Projectiles/Rogue/AshenStalactiteProj.cs | 2 +- Projectiles/Rogue/AshenStalagmiteProj.cs | 2 +- Projectiles/Rogue/BlunderBoosterLightning.cs | 2 +- Projectiles/Rogue/CosmicKunaiProj.cs | 4 +-- Projectiles/Rogue/InfernalKrisProjectile.cs | 2 +- Projectiles/Rogue/JawsProjectile.cs | 2 +- Projectiles/Rogue/LeviathanTooth.cs | 2 +- Projectiles/Rogue/LunarKunaiProj.cs | 2 +- Projectiles/Rogue/LuxorsGiftRogue.cs | 2 +- Projectiles/Rogue/MalachiteBolt.cs | 2 +- Projectiles/Rogue/MycorootProj.cs | 2 +- .../Rogue/PalladiumJavelinProjectile.cs | 2 +- .../Rogue/ScourgeoftheSeasProjectile.cs | 2 +- Projectiles/Rogue/ShockGrenadeBolt.cs | 2 +- Projectiles/Rogue/TheSyringeCinder.cs | 2 +- Projectiles/Summon/ForbiddenCircletEater.cs | 2 +- Projectiles/Summon/HauntedDishes.cs | 2 +- Projectiles/Summon/MiniGuardianRock.cs | 1 - Projectiles/Summon/OldDukeSharkVomit.cs | 2 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 34 ++++--------------- Projectiles/Summon/VileFeederProjectile.cs | 2 +- Projectiles/Typeless/CursorProj.cs | 2 +- Projectiles/Typeless/CursorProjSplit.cs | 2 +- Projectiles/Typeless/GodKiller.cs | 2 +- Projectiles/Typeless/SkyFlareFriendly.cs | 2 +- UI/FlightBar/FlightBar.cs | 1 - 134 files changed, 143 insertions(+), 185 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8ca0fe63e2..f87c010e55 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1638,8 +1638,7 @@ namespace CalamityMod.CalPlayer for (int j = 0; j < 2; j++) { - int green = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y), Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f); - Dust dust = Main.dust[green]; + Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f); dust.position.X += (float)Main.rand.Next(-20, 21); dust.position.Y += (float)Main.rand.Next(-20, 21); dust.velocity *= 0.9f; diff --git a/Items/Accessories/DeepDiver.cs b/Items/Accessories/DeepDiver.cs index 63e789b5da..d4d6f1c119 100644 --- a/Items/Accessories/DeepDiver.cs +++ b/Items/Accessories/DeepDiver.cs @@ -3,8 +3,6 @@ using CalamityMod.CalPlayer.Dashes; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ID; -using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index b6d4ac8265..33e9b113be 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -12,8 +12,6 @@ using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.ModLoader; -using System.IO; -using Terraria.Audio; using CalamityMod.Particles; using Steamworks; using CalamityMod.Items.Weapons.Summon; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index f141ad4969..0758cf122c 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -40,8 +40,6 @@ using Terraria.GameContent.ItemDropRules; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; -using Terraria.GameContent.ItemDropRules; using ReLogic.Utilities; using CalamityMod.Projectiles.Ranged; using Steamworks; diff --git a/Particles/NanoParticle.cs b/Particles/NanoParticle.cs index 6d7176c953..f58fe0f7c2 100644 --- a/Particles/NanoParticle.cs +++ b/Particles/NanoParticle.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Particles public override bool UseCustomDraw => true; public override bool SetLifetime => true; - private float Spin; private float opacity; private bool Big; private bool EmitsLight; diff --git a/Projectiles/Boss/ArtemisLaser.cs b/Projectiles/Boss/ArtemisLaser.cs index c9688963bc..8232a47fdc 100644 --- a/Projectiles/Boss/ArtemisLaser.cs +++ b/Projectiles/Boss/ArtemisLaser.cs @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } } else if (Destination == Vector2.Zero) diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index 1b1f0af425..3738d2946f 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Lighting.AddLight(Projectile.Center, 0.3f, 0.5f, 0.1f); diff --git a/Projectiles/Boss/AstralLaser.cs b/Projectiles/Boss/AstralLaser.cs index ffc81e4bbe..fbc21c0d28 100644 --- a/Projectiles/Boss/AstralLaser.cs +++ b/Projectiles/Boss/AstralLaser.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Lighting.AddLight(Projectile.Center, 0.3f, 0.3f, 0f); diff --git a/Projectiles/Boss/DoGBeam.cs b/Projectiles/Boss/DoGBeam.cs index a11543e184..109c0b94bf 100644 --- a/Projectiles/Boss/DoGBeam.cs +++ b/Projectiles/Boss/DoGBeam.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(Projectile.Center, 0f, 0.2f, 0.3f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; int playerTracker = Player.FindClosest(Projectile.Center, 1, 1); Projectile.ai[1] += 1f; diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index 95b288c990..9a6e845e2d 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { Projectile.tileCollide = Projectile.timeLeft < 540; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { diff --git a/Projectiles/Boss/HiveBombGoliath.cs b/Projectiles/Boss/HiveBombGoliath.cs index a90bab176b..fb00892801 100644 --- a/Projectiles/Boss/HiveBombGoliath.cs +++ b/Projectiles/Boss/HiveBombGoliath.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss Main.dust[smoke].noGravity = true; Main.dust[smoke].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2 - 6)).RotatedBy((double)Projectile.rotation, default) * 1.1f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index 8098529947..a67011d71c 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss } } - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + 1.57f; + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Boss/PhantomShot.cs b/Projectiles/Boss/PhantomShot.cs index 5558a33561..3d1d3021cf 100644 --- a/Projectiles/Boss/PhantomShot.cs +++ b/Projectiles/Boss/PhantomShot.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.ai[1] = 1f; SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); } - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + 1.57f; + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 9f) { diff --git a/Projectiles/Boss/PhantomShot2.cs b/Projectiles/Boss/PhantomShot2.cs index dc2ba4eb17..fc48efce2d 100644 --- a/Projectiles/Boss/PhantomShot2.cs +++ b/Projectiles/Boss/PhantomShot2.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.ai[1] = 1f; SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); } - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + 1.57f; + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 9f) { diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index 2643d72337..7187932d5e 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.timeLeft < 510) Projectile.tileCollide = true; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver4; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; Projectile.ai[0] += 1f; if (Projectile.ai[0] <= 20f) diff --git a/Projectiles/Boss/SCalBrimstoneFireblast.cs b/Projectiles/Boss/SCalBrimstoneFireblast.cs index 79ce4c173f..24c351c165 100644 --- a/Projectiles/Boss/SCalBrimstoneFireblast.cs +++ b/Projectiles/Boss/SCalBrimstoneFireblast.cs @@ -11,10 +11,6 @@ using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ID; -using Terraria.Audio; -using CalamityMod.NPCs.SupremeCalamitas; -using CalamityMod.NPCs; using static Humanizer.In; using CalamityMod.Particles; diff --git a/Projectiles/Boss/SCalBrimstoneGigablast.cs b/Projectiles/Boss/SCalBrimstoneGigablast.cs index 26cc6ee335..af04e750d0 100644 --- a/Projectiles/Boss/SCalBrimstoneGigablast.cs +++ b/Projectiles/Boss/SCalBrimstoneGigablast.cs @@ -11,10 +11,6 @@ using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ID; -using Terraria.Audio; -using CalamityMod.NPCs.SupremeCalamitas; -using CalamityMod.NPCs; using CalamityMod.Particles; namespace CalamityMod.Projectiles.Boss diff --git a/Projectiles/Boss/THanosSideLaser.cs b/Projectiles/Boss/THanosSideLaser.cs index d5b1b1c2bc..4e6a1aa74a 100644 --- a/Projectiles/Boss/THanosSideLaser.cs +++ b/Projectiles/Boss/THanosSideLaser.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } } else if (Velocity == Vector2.Zero) diff --git a/Projectiles/Boss/ThanatosLaser.cs b/Projectiles/Boss/ThanatosLaser.cs index 3eea7362f4..24e844b4d6 100644 --- a/Projectiles/Boss/ThanatosLaser.cs +++ b/Projectiles/Boss/ThanatosLaser.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } } else if (Velocity == Vector2.Zero) @@ -176,7 +176,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } } else if (Destination == Vector2.Zero) diff --git a/Projectiles/Enemy/PearlBurst.cs b/Projectiles/Enemy/PearlBurst.cs index d883ffae0d..3e35181991 100644 --- a/Projectiles/Enemy/PearlBurst.cs +++ b/Projectiles/Enemy/PearlBurst.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Enemy { Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Projectile.alpha -= 6; Projectile.ai[1] += 1f; if (Projectile.ai[1] <= 20f) diff --git a/Projectiles/Enemy/PearlRain.cs b/Projectiles/Enemy/PearlRain.cs index 78c50d10be..97435f618b 100644 --- a/Projectiles/Enemy/PearlRain.cs +++ b/Projectiles/Enemy/PearlRain.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Enemy { Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Projectile.alpha -= 6; } diff --git a/Projectiles/Enemy/SulphuricAcidMist.cs b/Projectiles/Enemy/SulphuricAcidMist.cs index 95fcf1d01d..b037e6fabc 100644 --- a/Projectiles/Enemy/SulphuricAcidMist.cs +++ b/Projectiles/Enemy/SulphuricAcidMist.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Enemy else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } if (Projectile.ai[0] >= 480f) diff --git a/Projectiles/Magic/AcidicSaxMist.cs b/Projectiles/Magic/AcidicSaxMist.cs index e268e99d6b..4ff3e96349 100644 --- a/Projectiles/Magic/AcidicSaxMist.cs +++ b/Projectiles/Magic/AcidicSaxMist.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Projectile.ai[0] += 1f; if (Projectile.ai[0] >= 90f) diff --git a/Projectiles/Magic/AuraRain.cs b/Projectiles/Magic/AuraRain.cs index 3de2e0bd17..d670cf383a 100644 --- a/Projectiles/Magic/AuraRain.cs +++ b/Projectiles/Magic/AuraRain.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Dust dust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Demonite, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f)]; dust.velocity = Vector2.Zero; dust.position -= Projectile.velocity / 5f; diff --git a/Projectiles/Magic/BlackAnurianPlankton.cs b/Projectiles/Magic/BlackAnurianPlankton.cs index 4eecaab9f7..4269f14e51 100644 --- a/Projectiles/Magic/BlackAnurianPlankton.cs +++ b/Projectiles/Magic/BlackAnurianPlankton.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.alpha = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; float projX = Projectile.position.X; float projY = Projectile.position.Y; float homingRange = 100000f; diff --git a/Projectiles/Magic/BloodBeam.cs b/Projectiles/Magic/BloodBeam.cs index 8b8d6d3a32..19dd655fa2 100644 --- a/Projectiles/Magic/BloodBeam.cs +++ b/Projectiles/Magic/BloodBeam.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.ai[0] += 1f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); diff --git a/Projectiles/Magic/CoralSpike.cs b/Projectiles/Magic/CoralSpike.cs index 31c5063db1..92e4ac1b18 100644 --- a/Projectiles/Magic/CoralSpike.cs +++ b/Projectiles/Magic/CoralSpike.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Projectile.velocity *= 0.96f; - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + 1.57f; + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; if (Projectile.velocity.Length() < 2f) Projectile.Kill(); diff --git a/Projectiles/Magic/DivineRetributionSpear.cs b/Projectiles/Magic/DivineRetributionSpear.cs index 95847a1b35..776538b8cb 100644 --- a/Projectiles/Magic/DivineRetributionSpear.cs +++ b/Projectiles/Magic/DivineRetributionSpear.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Lighting.AddLight(Projectile.Center, 0.7f, 0.3f, 0f); diff --git a/Projectiles/Magic/EidolicWailSoundwave.cs b/Projectiles/Magic/EidolicWailSoundwave.cs index 6f39fb8541..9d5fc819c4 100644 --- a/Projectiles/Magic/EidolicWailSoundwave.cs +++ b/Projectiles/Magic/EidolicWailSoundwave.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.width = 36; Projectile.height = 36; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Magic/GammaLaser.cs b/Projectiles/Magic/GammaLaser.cs index 6b42e632dd..85f8aa17ec 100644 --- a/Projectiles/Magic/GammaLaser.cs +++ b/Projectiles/Magic/GammaLaser.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Lighting.AddLight(Projectile.Center, 0.1f, 0.35f, 0f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; if (Main.rand.NextBool(7)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.GreenFairy, 0f, 0f); diff --git a/Projectiles/Magic/HellwingPillar.cs b/Projectiles/Magic/HellwingPillar.cs index 9fc02a2a06..9f8e0c1d9a 100644 --- a/Projectiles/Magic/HellwingPillar.cs +++ b/Projectiles/Magic/HellwingPillar.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.ai[0] += 1f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Magic/IcicleStaffProj.cs b/Projectiles/Magic/IcicleStaffProj.cs index d3b209f90e..d5790eb209 100644 --- a/Projectiles/Magic/IcicleStaffProj.cs +++ b/Projectiles/Magic/IcicleStaffProj.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { diff --git a/Projectiles/Magic/IonBlast.cs b/Projectiles/Magic/IonBlast.cs index 69c16b3363..16f2ce592a 100644 --- a/Projectiles/Magic/IonBlast.cs +++ b/Projectiles/Magic/IonBlast.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity *= 1.015f; if (Projectile.alpha > 0) { diff --git a/Projectiles/Magic/LuxorsGiftMagic.cs b/Projectiles/Magic/LuxorsGiftMagic.cs index 6ae52d7d7e..01915b5d3e 100644 --- a/Projectiles/Magic/LuxorsGiftMagic.cs +++ b/Projectiles/Magic/LuxorsGiftMagic.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.localAI[0] == 0f) { Projectile.scale -= 0.01f; diff --git a/Projectiles/Magic/ManaBoltSmall2.cs b/Projectiles/Magic/ManaBoltSmall2.cs index 7451c208ed..2278759d9f 100644 --- a/Projectiles/Magic/ManaBoltSmall2.cs +++ b/Projectiles/Magic/ManaBoltSmall2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity.X *= 0.975f; Projectile.velocity.Y *= 0.975f; if (Projectile.timeLeft % 4 == 0) diff --git a/Projectiles/Magic/PlagueFang.cs b/Projectiles/Magic/PlagueFang.cs index 404d98ac35..443df05763 100644 --- a/Projectiles/Magic/PlagueFang.cs +++ b/Projectiles/Magic/PlagueFang.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.alpha > 0) { Projectile.alpha -= 50; diff --git a/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs b/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs index 1bfe2c3dc1..82a333a554 100644 --- a/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs +++ b/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.velocity *= 1.01f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.frameCounter++; if (Projectile.frameCounter > 4) { diff --git a/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs b/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs index c5d649feb7..f7ff1b9085 100644 --- a/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs +++ b/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Magic else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } } diff --git a/Projectiles/Magic/SerpentineHead.cs b/Projectiles/Magic/SerpentineHead.cs index b481581ad9..b49cdfa57a 100644 --- a/Projectiles/Magic/SerpentineHead.cs +++ b/Projectiles/Magic/SerpentineHead.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Magic } if (Projectile.velocity.X != 0f || Projectile.velocity.Y != 0f) { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } if (Projectile.velocity.Y > 16f) { diff --git a/Projectiles/Magic/TradewindsProjectile.cs b/Projectiles/Magic/TradewindsProjectile.cs index 51003f8a64..3963edfbe5 100644 --- a/Projectiles/Magic/TradewindsProjectile.cs +++ b/Projectiles/Magic/TradewindsProjectile.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Main.rand.NextBool(3)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.YellowTorch, 0f, 0f); diff --git a/Projectiles/Magic/UndinesRetributionSpear.cs b/Projectiles/Magic/UndinesRetributionSpear.cs index 7acf7ee178..26aa156310 100644 --- a/Projectiles/Magic/UndinesRetributionSpear.cs +++ b/Projectiles/Magic/UndinesRetributionSpear.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Lighting.AddLight(Projectile.Center, 0f, 0.1f, 0.7f); if (Main.player[Projectile.owner].active && !Main.player[Projectile.owner].dead) diff --git a/Projectiles/Magic/VenusianBolt.cs b/Projectiles/Magic/VenusianBolt.cs index 9bd19c76b1..55c7c4f354 100644 --- a/Projectiles/Magic/VenusianBolt.cs +++ b/Projectiles/Magic/VenusianBolt.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.ToRadians(45); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45); Lighting.AddLight(Projectile.Center, 0.25f, 0.2f, 0f); if (Projectile.wet && !Projectile.lavaWet) { diff --git a/Projectiles/Magic/WaterLeechProj.cs b/Projectiles/Magic/WaterLeechProj.cs index b96041d0c5..bd97f05329 100644 --- a/Projectiles/Magic/WaterLeechProj.cs +++ b/Projectiles/Magic/WaterLeechProj.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.ai[0] == 0f) { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.Pi; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.Pi; } //Sticky Behaviour Projectile.StickyProjAI(5); diff --git a/Projectiles/Melee/BalefulHarvesterProjectile.cs b/Projectiles/Melee/BalefulHarvesterProjectile.cs index a535e551ff..d5371d6a92 100644 --- a/Projectiles/Melee/BalefulHarvesterProjectile.cs +++ b/Projectiles/Melee/BalefulHarvesterProjectile.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Melee else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } for (int j = 0; j < 2; j++) diff --git a/Projectiles/Melee/BallOFuguProj.cs b/Projectiles/Melee/BallOFuguProj.cs index 18fbd89d87..08ab2fec41 100644 --- a/Projectiles/Melee/BallOFuguProj.cs +++ b/Projectiles/Melee/BallOFuguProj.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee { Player player = Main.player[Projectile.owner]; Vector2 projVector = player.Center - Projectile.Center; - Projectile.rotation = projVector.ToRotation() - 1.57f; + Projectile.rotation = projVector.ToRotation() - MathHelper.PiOver2; if (player.dead) { Projectile.Kill(); @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2((float)texture2D2.Width * 0.5f, (float)texture2D2.Height * 0.5f); float projHeight = (float)texture2D2.Height; Vector2 actualCenter = mountedCenter - projCenter; - float drawRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - 1.57f; + float drawRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - MathHelper.PiOver2; bool isActive = true; if (float.IsNaN(projCenter.X) && float.IsNaN(projCenter.Y)) { diff --git a/Projectiles/Melee/BrimstoneLaserFriendly.cs b/Projectiles/Melee/BrimstoneLaserFriendly.cs index ed3c0fd49b..e10a901cc6 100644 --- a/Projectiles/Melee/BrimstoneLaserFriendly.cs +++ b/Projectiles/Melee/BrimstoneLaserFriendly.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Melee Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.05f / 255f, (255 - Projectile.alpha) * 0.05f / 255f); Projectile.velocity.X *= 1.05f; Projectile.velocity.Y *= 1.05f; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity.Y += Projectile.ai[0]; if (Main.rand.NextBool()) { diff --git a/Projectiles/Melee/BrimstoneSwordProj.cs b/Projectiles/Melee/BrimstoneSwordProj.cs index fc486e8bb0..35962b9735 100644 --- a/Projectiles/Melee/BrimstoneSwordProj.cs +++ b/Projectiles/Melee/BrimstoneSwordProj.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.ToRadians(45f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); if (Main.rand.NextBool(4)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); diff --git a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs index f72d1b7d93..107ac41320 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs index b93ecb467e..270fc9796e 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee { float collisionPoint = 0f; float bladeLength = 120f * Projectile.scale; - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60); return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLength), 24, ref collisionPoint); } @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60); Vector2 drawOrigin = new Vector2(0f, handle.Height); Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; diff --git a/Projectiles/Melee/ClamCrusherFlail.cs b/Projectiles/Melee/ClamCrusherFlail.cs index b5295ba415..3ce47bbf54 100644 --- a/Projectiles/Melee/ClamCrusherFlail.cs +++ b/Projectiles/Melee/ClamCrusherFlail.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = true; } Vector2 flailDirection = Main.player[Projectile.owner].Center - Projectile.Center; - Projectile.rotation = flailDirection.ToRotation() - 1.57f; + Projectile.rotation = flailDirection.ToRotation() - MathHelper.PiOver2; if (Main.player[Projectile.owner].dead) { Projectile.Kill(); @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2((float)texture2D2.Width * 0.5f, (float)texture2D2.Height * 0.5f); float projHeight = (float)texture2D2.Height; Vector2 actualCenter = mountedCenter - projCenter; - float flailRotate = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - 1.57f; + float flailRotate = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - MathHelper.PiOver2; bool isActive = true; if (float.IsNaN(projCenter.X) && float.IsNaN(projCenter.Y)) { diff --git a/Projectiles/Melee/CrystylCrusherRay.cs b/Projectiles/Melee/CrystylCrusherRay.cs index d355afffbb..347db9a0cd 100644 --- a/Projectiles/Melee/CrystylCrusherRay.cs +++ b/Projectiles/Melee/CrystylCrusherRay.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 maxLength = Main.MouseWorld - Main.player[Projectile.owner].Center; DrawLaser(ModContent.Request(Texture).Value, Main.player[Projectile.owner].Center, - Projectile.velocity, 15f, Projectile.damage, -1.57f, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE); + Projectile.velocity, 15f, Projectile.damage, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE); } return false; } @@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Melee } int chargeFact = (int)(Charge / 20f); Vector2 dustVelocity = Vector2.UnitX * 18f; - dustVelocity = dustVelocity.RotatedBy(Projectile.rotation - 1.57f); + dustVelocity = dustVelocity.RotatedBy(Projectile.rotation - MathHelper.PiOver2); Vector2 spawnPos = Projectile.Center + dustVelocity; for (int k = 0; k < chargeFact + 1; k++) { diff --git a/Projectiles/Melee/EutrophicScimitarProj.cs b/Projectiles/Melee/EutrophicScimitarProj.cs index b332df7ae4..a5564d719a 100644 --- a/Projectiles/Melee/EutrophicScimitarProj.cs +++ b/Projectiles/Melee/EutrophicScimitarProj.cs @@ -50,17 +50,17 @@ namespace CalamityMod.Projectiles.Melee } if (Projectile.velocity.X < 0f) { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } else { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } if (Main.rand.NextBool()) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Electric, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, 0, new Color(255, 255, 255), 0.5f); } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Melee/Feather.cs b/Projectiles/Melee/Feather.cs index 018f788305..fade5444c1 100644 --- a/Projectiles/Melee/Feather.cs +++ b/Projectiles/Melee/Feather.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 4a5d0cec38..4dee359b04 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -198,7 +198,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index b48d3c0e9f..c948b565c9 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = Projectile.velocity.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index 764e68fe7a..dea78a8c39 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -254,7 +254,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index 10e26d1ce7..0f0d6f1402 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/GalileosPlanet.cs b/Projectiles/Melee/GalileosPlanet.cs index 8208cac6ee..a51dceec4b 100644 --- a/Projectiles/Melee/GalileosPlanet.cs +++ b/Projectiles/Melee/GalileosPlanet.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; for (float i = -5; i <= 0; i++) { if (Main.rand.NextFloat(1f) < 0.4f) diff --git a/Projectiles/Melee/GelWave.cs b/Projectiles/Melee/GelWave.cs index adc9ac9b10..a7f1df640e 100644 --- a/Projectiles/Melee/GelWave.cs +++ b/Projectiles/Melee/GelWave.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localAI[0] += 1f; } Lighting.AddLight(Projectile.Center, 0f, 0.2f, 0.4f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity.Y += Projectile.ai[0]; if (Main.rand.NextBool()) { diff --git a/Projectiles/Melee/GhastlySoulLarge.cs b/Projectiles/Melee/GhastlySoulLarge.cs index 3fdd5216a3..0a148d3a19 100644 --- a/Projectiles/Melee/GhastlySoulLarge.cs +++ b/Projectiles/Melee/GhastlySoulLarge.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 30; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/GhastlySoulMedium.cs b/Projectiles/Melee/GhastlySoulMedium.cs index 3adef4a491..41e5e9bb77 100644 --- a/Projectiles/Melee/GhastlySoulMedium.cs +++ b/Projectiles/Melee/GhastlySoulMedium.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 30; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/GhastlySoulSmall.cs b/Projectiles/Melee/GhastlySoulSmall.cs index 85845b1d7c..932c6060de 100644 --- a/Projectiles/Melee/GhastlySoulSmall.cs +++ b/Projectiles/Melee/GhastlySoulSmall.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 30; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/GreenWater.cs b/Projectiles/Melee/GreenWater.cs index 04f4538157..ed9b0cd04e 100644 --- a/Projectiles/Melee/GreenWater.cs +++ b/Projectiles/Melee/GreenWater.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee Lighting.AddLight(Projectile.Center, 0.5f, 0.25f, 0f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver4; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Projectile.localAI[0] == 0f) { diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs index 9df3e7d636..898512a111 100644 --- a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs +++ b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs @@ -167,7 +167,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index 5ebbdb63e1..10dbf2ddde 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -182,7 +182,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs index 59c0411706..6962226acb 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs index 43ef820007..17f21ef9ae 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = rotation; if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs index d1288ec255..df30ba3975 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee { float collisionPoint = 0f; float bladeLength = 140f * Projectile.scale; - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60); return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLength), 24, ref collisionPoint); } @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60); Vector2 drawOrigin = new Vector2(0f, handle.Height); Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; diff --git a/Projectiles/Melee/MirrorBlast.cs b/Projectiles/Melee/MirrorBlast.cs index 20f68589e8..5b768e9693 100644 --- a/Projectiles/Melee/MirrorBlast.cs +++ b/Projectiles/Melee/MirrorBlast.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.velocity *= 1.02f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Lighting.AddLight(Projectile.Center, 0f, 0.35f, 0.35f); } diff --git a/Projectiles/Melee/MonstrousKnife.cs b/Projectiles/Melee/MonstrousKnife.cs index 8c18155e34..729f668ea6 100644 --- a/Projectiles/Melee/MonstrousKnife.cs +++ b/Projectiles/Melee/MonstrousKnife.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Kill(); } if (Projectile.ai[0] < 30f) - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Melee/MourningSkull.cs b/Projectiles/Melee/MourningSkull.cs index 6eb15bdd7a..d3c6622512 100644 --- a/Projectiles/Melee/MourningSkull.cs +++ b/Projectiles/Melee/MourningSkull.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } if (Projectile.ai[0] >= 0f && Projectile.ai[0] < 200f) @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } int eightConst = 8; diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 61149c8250..72feafc6e6 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Projectile.ai[1] == 0f) { diff --git a/Projectiles/Melee/PrismaticWave.cs b/Projectiles/Melee/PrismaticWave.cs index 95421f0ff0..582a55ff9b 100644 --- a/Projectiles/Melee/PrismaticWave.cs +++ b/Projectiles/Melee/PrismaticWave.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Melee } } Lighting.AddLight(Projectile.Center, Main.DiscoR * 0.5f / 255f, Main.DiscoG * 0.5f / 255f, Main.DiscoB * 0.5f / 255f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); if (Main.rand.NextBool()) { int rainbow = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.RainbowMk2, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, alpha, Main.rand.Next(colors)); diff --git a/Projectiles/Melee/ScourgeoftheCosmosProj.cs b/Projectiles/Melee/ScourgeoftheCosmosProj.cs index d8185d280e..bb5bb91e57 100644 --- a/Projectiles/Melee/ScourgeoftheCosmosProj.cs +++ b/Projectiles/Melee/ScourgeoftheCosmosProj.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.alpha -= 50; if (Projectile.alpha < 0) Projectile.alpha = 0; - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + 0.785f; + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver4; Projectile.ai[0] += 1f; if (Projectile.ai[0] >= 180f) { diff --git a/Projectiles/Melee/SolsticeBeam.cs b/Projectiles/Melee/SolsticeBeam.cs index 801b10ef54..b9d7c5b904 100644 --- a/Projectiles/Melee/SolsticeBeam.cs +++ b/Projectiles/Melee/SolsticeBeam.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { Lighting.AddLight(Projectile.Center, 0.5f, 0.5f, 0.5f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Projectile.ai[1] == 0f) { Projectile.ai[1] = 1f; diff --git a/Projectiles/Melee/SpineOfThanatosProjectile.cs b/Projectiles/Melee/SpineOfThanatosProjectile.cs index 73dee9e2c4..03b6fb9bc1 100644 --- a/Projectiles/Melee/SpineOfThanatosProjectile.cs +++ b/Projectiles/Melee/SpineOfThanatosProjectile.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee float attackCompletionRatio = Utils.GetLerpValue(Lifetime, FlyBackTime, Projectile.timeLeft, true); // Normally swing from a "cone" to a collision area that causes both whips to collide. - float baseSwingAngle = MathHelper.Lerp(-1.1f, 1.57f, 1f - attackCompletionRatio); + float baseSwingAngle = MathHelper.Lerp(-1.1f, MathHelper.PiOver2, 1f - attackCompletionRatio); Vector2 swingDirection = (SwingDirection * baseSwingAngle + MathHelper.PiOver2).ToRotationVector2(); swingDirection = swingDirection.RotatedBy(InitialDirectionRotation); diff --git a/Projectiles/Melee/TenebreusTidesWaterSpear.cs b/Projectiles/Melee/TenebreusTidesWaterSpear.cs index 0734418b29..2041a12cc6 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSpear.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSpear.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); // If projectile hasn't hit anything yet if (Projectile.ai[0] == 0f) diff --git a/Projectiles/Melee/TenebreusTidesWaterSword.cs b/Projectiles/Melee/TenebreusTidesWaterSword.cs index f40148f3f6..99dd5b57c1 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSword.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSword.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.ToRadians(45f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); // If projectile hasn't hit anything yet if (Projectile.ai[0] == 0f) diff --git a/Projectiles/Melee/TerraSpear.cs b/Projectiles/Melee/TerraSpear.cs index 8e9aeb8c6f..5411a95685 100644 --- a/Projectiles/Melee/TerraSpear.cs +++ b/Projectiles/Melee/TerraSpear.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Melee { Lighting.AddLight(Projectile.Center, 0f, 1f, 0f); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver4; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Projectile.localAI[1] == 0f) { diff --git a/Projectiles/Melee/TerrorBeam.cs b/Projectiles/Melee/TerrorBeam.cs index 005a209653..3dadc5c1ea 100644 --- a/Projectiles/Melee/TerrorBeam.cs +++ b/Projectiles/Melee/TerrorBeam.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.alpha = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 84619904c8..e01060d597 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = Projectile.rotation; if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs b/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs index 6664cc0f00..24dafd7d89 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index 59dd09c7aa..518562598a 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 463c733271..8c8351f8f7 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -242,7 +242,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = direction.ToRotation(); if (Owner.direction != 1) { - Owner.itemRotation -= 3.14f; + Owner.itemRotation -= MathHelper.Pi; } Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; diff --git a/Projectiles/Melee/TumbleweedFlail.cs b/Projectiles/Melee/TumbleweedFlail.cs index 5cb0c81030..b3b204545f 100644 --- a/Projectiles/Melee/TumbleweedFlail.cs +++ b/Projectiles/Melee/TumbleweedFlail.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2((float)texture2D2.Width * 0.5f, (float)texture2D2.Height * 0.5f); float projHeight = (float)texture2D2.Height; Vector2 actualCenter = mountedCenter - projCenter; - float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - 1.57f; + float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - MathHelper.PiOver2; bool isActive = true; if (float.IsNaN(projCenter.X) && float.IsNaN(projCenter.Y)) { diff --git a/Projectiles/Melee/UrchinBall.cs b/Projectiles/Melee/UrchinBall.cs index ab50840cf8..439efbe746 100644 --- a/Projectiles/Melee/UrchinBall.cs +++ b/Projectiles/Melee/UrchinBall.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee { Player player = Main.player[Projectile.owner]; Vector2 projDirection = player.Center - Projectile.Center; - Projectile.rotation = projDirection.ToRotation() - 1.57f; + Projectile.rotation = projDirection.ToRotation() - MathHelper.PiOver2; if (player.dead) { Projectile.Kill(); @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2((float)texture2D2.Width * 0.5f, (float)texture2D2.Height * 0.5f); float projHeight = (float)texture2D2.Height; Vector2 actualCenter = mountedCenter - projCenter; - float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - 1.57f; + float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - MathHelper.PiOver2; bool isActive = true; if (float.IsNaN(projCenter.X) && float.IsNaN(projCenter.Y)) { diff --git a/Projectiles/Melee/UrchinSpikeFugu.cs b/Projectiles/Melee/UrchinSpikeFugu.cs index d76ba18e0e..aa1e315677 100644 --- a/Projectiles/Melee/UrchinSpikeFugu.cs +++ b/Projectiles/Melee/UrchinSpikeFugu.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.ai[0] == 0f) { float maxRange = Projectile.ai[1] == 1f ? 256f : 100f; // Increased homing range for Lionfish diff --git a/Projectiles/Melee/VolcanicFireballLarge.cs b/Projectiles/Melee/VolcanicFireballLarge.cs index b003aa1203..c031cf1664 100644 --- a/Projectiles/Melee/VolcanicFireballLarge.cs +++ b/Projectiles/Melee/VolcanicFireballLarge.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); Lighting.AddLight(Projectile.Center, 0.4f, 0f, 0f); if (Main.rand.NextBool(4)) { diff --git a/Projectiles/Melee/YateveoBloomProj.cs b/Projectiles/Melee/YateveoBloomProj.cs index 76f9b41ef4..1e4dcf6113 100644 --- a/Projectiles/Melee/YateveoBloomProj.cs +++ b/Projectiles/Melee/YateveoBloomProj.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { Vector2 projDirection = Main.player[Projectile.owner].MountedCenter - Projectile.Center; - Projectile.rotation = projDirection.ToRotation() - 1.57f; + Projectile.rotation = projDirection.ToRotation() - MathHelper.PiOver2; float distance = projDirection.Length(); if (Main.player[Projectile.owner].dead) @@ -187,7 +187,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2((float)texture2D2.Width * 0.5f, (float)texture2D2.Height * 0.5f); float projHeight = (float)texture2D2.Height; Vector2 actualCenter = mountedCenter - projCenter; - float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - 1.57f; + float projRotation = (float)Math.Atan2((double)actualCenter.Y, (double)actualCenter.X) - MathHelper.PiOver2; bool isActive = true; if (float.IsNaN(projCenter.X) && float.IsNaN(projCenter.Y)) { diff --git a/Projectiles/Pets/Sparks.cs b/Projectiles/Pets/Sparks.cs index 2de5ffba80..a4e6781040 100644 --- a/Projectiles/Pets/Sparks.cs +++ b/Projectiles/Pets/Sparks.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Projectiles.Pets private void Pickup() { - int defaultItemGrabRange = 38; Player player = Main.player[Projectile.owner]; for (int itemIndex = 0; itemIndex < Main.maxItems; itemIndex++) diff --git a/Projectiles/Ranged/AstralCannonProjectile.cs b/Projectiles/Ranged/AstralCannonProjectile.cs index 0ca7ddea5c..2be0ef7466 100644 --- a/Projectiles/Ranged/AstralCannonProjectile.cs +++ b/Projectiles/Ranged/AstralCannonProjectile.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Ranged else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } Lighting.AddLight(Projectile.Center, 0.3f, 0.5f, 0.1f); Projectile.velocity *= 1.075f; diff --git a/Projectiles/Ranged/AstrealArrow.cs b/Projectiles/Ranged/AstrealArrow.cs index b47e569cec..0fe493e714 100644 --- a/Projectiles/Ranged/AstrealArrow.cs +++ b/Projectiles/Ranged/AstrealArrow.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.localAI[0] == 0f) { diff --git a/Projectiles/Ranged/BarinadeArrow.cs b/Projectiles/Ranged/BarinadeArrow.cs index 1fc7c435e9..3b663a244f 100644 --- a/Projectiles/Ranged/BarinadeArrow.cs +++ b/Projectiles/Ranged/BarinadeArrow.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Vector3 DustLight = new Vector3(0.171f, 0.124f, 0.086f); Lighting.AddLight(Projectile.Center, DustLight * 3); - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft == 300) { diff --git a/Projectiles/Ranged/BoltArrow.cs b/Projectiles/Ranged/BoltArrow.cs index c797971de6..69ea77610f 100644 --- a/Projectiles/Ranged/BoltArrow.cs +++ b/Projectiles/Ranged/BoltArrow.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] == 15f) { diff --git a/Projectiles/Ranged/ContagionArrow.cs b/Projectiles/Ranged/ContagionArrow.cs index 43edc06092..04e8f7b438 100644 --- a/Projectiles/Ranged/ContagionArrow.cs +++ b/Projectiles/Ranged/ContagionArrow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; addBallTimer--; if (addBallTimer <= 0) { diff --git a/Projectiles/Ranged/FeatherLarge.cs b/Projectiles/Ranged/FeatherLarge.cs index 10c5407ce5..f516e7080f 100644 --- a/Projectiles/Ranged/FeatherLarge.cs +++ b/Projectiles/Ranged/FeatherLarge.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Ranged/FishronRPG.cs b/Projectiles/Ranged/FishronRPG.cs index 9777f8ea95..257becbc69 100644 --- a/Projectiles/Ranged/FishronRPG.cs +++ b/Projectiles/Ranged/FishronRPG.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ai[1] = 1f; SoundEngine.PlaySound(SoundID.Item92, Projectile.position); } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.owner == Main.myPlayer && Projectile.timeLeft <= 3) { Projectile.tileCollide = false; diff --git a/Projectiles/Ranged/LeafArrow.cs b/Projectiles/Ranged/LeafArrow.cs index 1ca31f8f8b..495a5168e8 100644 --- a/Projectiles/Ranged/LeafArrow.cs +++ b/Projectiles/Ranged/LeafArrow.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.localAI[0] = 0f; } } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 3.14f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.Pi; if (Projectile.localAI[1] <= 30f) { Projectile.localAI[1] += 1f; diff --git a/Projectiles/Ranged/RainbowFront.cs b/Projectiles/Ranged/RainbowFront.cs index 5061c2fd78..b8154deb06 100644 --- a/Projectiles/Ranged/RainbowFront.cs +++ b/Projectiles/Ranged/RainbowFront.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged float yVel = y * velocityMult; Projectile.velocity.X = xVel; Projectile.velocity.Y = yVel; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override Color? GetAlpha(Color lightColor) => Color.Transparent; diff --git a/Projectiles/Ranged/SandstormBullet.cs b/Projectiles/Ranged/SandstormBullet.cs index 73563b62ed..c2763f0659 100644 --- a/Projectiles/Ranged/SandstormBullet.cs +++ b/Projectiles/Ranged/SandstormBullet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { diff --git a/Projectiles/Ranged/SeasSearingSecondary.cs b/Projectiles/Ranged/SeasSearingSecondary.cs index 9fef72d9a7..2ef11249e6 100644 --- a/Projectiles/Ranged/SeasSearingSecondary.cs +++ b/Projectiles/Ranged/SeasSearingSecondary.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.width = (int)(16f * Projectile.scale); Projectile.height = (int)(32f * Projectile.scale); } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { diff --git a/Projectiles/Ranged/SepticSkewerHarpoon.cs b/Projectiles/Ranged/SepticSkewerHarpoon.cs index 1a53547855..5e4628a6e4 100644 --- a/Projectiles/Ranged/SepticSkewerHarpoon.cs +++ b/Projectiles/Ranged/SepticSkewerHarpoon.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.ai[0] = 1f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.ai[1] += 1f; if (Projectile.ai[1] > 5f) { @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Ranged else if (Projectile.ai[0] == 1f) { Projectile.tileCollide = false; - Projectile.rotation = (float)Math.Atan2((double)yDist, (double)xDist) - 1.57f; + Projectile.rotation = (float)Math.Atan2((double)yDist, (double)xDist) - MathHelper.PiOver2; float returnSpeed = 20f; if (playerDistance < 50f) { diff --git a/Projectiles/Ranged/StormSurgeTornado.cs b/Projectiles/Ranged/StormSurgeTornado.cs index 932a66d6c4..114544d251 100644 --- a/Projectiles/Ranged/StormSurgeTornado.cs +++ b/Projectiles/Ranged/StormSurgeTornado.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Ranged/TerraArrowMain.cs b/Projectiles/Ranged/TerraArrowMain.cs index 9560e5d5d5..735cb630df 100644 --- a/Projectiles/Ranged/TerraArrowMain.cs +++ b/Projectiles/Ranged/TerraArrowMain.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - private bool initialized = false; private bool hitDirect = false; public override void SetDefaults() { diff --git a/Projectiles/Ranged/TerraBulletSplit.cs b/Projectiles/Ranged/TerraBulletSplit.cs index 87fabf0d06..5d52b7f61b 100644 --- a/Projectiles/Ranged/TerraBulletSplit.cs +++ b/Projectiles/Ranged/TerraBulletSplit.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Projectile.ai[2]++; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Dust dust = Dust.NewDustPerfect(Projectile.Center, 264, -Projectile.velocity * Main.rand.NextFloat(0.05f, 0.6f)); dust.noGravity = true; diff --git a/Projectiles/Ranged/ThePackMinissile.cs b/Projectiles/Ranged/ThePackMinissile.cs index 74099cefaa..57f02cb569 100644 --- a/Projectiles/Ranged/ThePackMinissile.cs +++ b/Projectiles/Ranged/ThePackMinissile.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 300f, 12f, 15f); Projectile.frameCounter++; if (Projectile.frameCounter > 3) diff --git a/Projectiles/Ranged/ThePackMissile.cs b/Projectiles/Ranged/ThePackMissile.cs index d4792d938f..3ae4347197 100644 --- a/Projectiles/Ranged/ThePackMissile.cs +++ b/Projectiles/Ranged/ThePackMissile.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); Vector2 targetCenter = Projectile.Center; float minTargetDistance = 2500f; bool homeIn = false; diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index 938fa2b91d..d40e05db3a 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); if (Projectile.spriteDirection == -1) { - Projectile.rotation -= 1.57f; + Projectile.rotation -= MathHelper.PiOver2; } if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Rogue/AshenStalactiteProj.cs b/Projectiles/Rogue/AshenStalactiteProj.cs index 3a97090aa7..1e66f259bb 100644 --- a/Projectiles/Rogue/AshenStalactiteProj.cs +++ b/Projectiles/Rogue/AshenStalactiteProj.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.ToRadians(45f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); Projectile.velocity.Y += 0.1f; if (Projectile.velocity.Y > 16f) diff --git a/Projectiles/Rogue/AshenStalagmiteProj.cs b/Projectiles/Rogue/AshenStalagmiteProj.cs index f022f650f4..e474f24ce2 100644 --- a/Projectiles/Rogue/AshenStalagmiteProj.cs +++ b/Projectiles/Rogue/AshenStalagmiteProj.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 2.355f; + Projectile.rotation = Projectile.velocity.ToRotation() + 2.355f; Projectile.velocity.Y += 0.075f; if (Projectile.velocity.Y > 16f) diff --git a/Projectiles/Rogue/BlunderBoosterLightning.cs b/Projectiles/Rogue/BlunderBoosterLightning.cs index a6c2593670..dd935e3195 100644 --- a/Projectiles/Rogue/BlunderBoosterLightning.cs +++ b/Projectiles/Rogue/BlunderBoosterLightning.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft < 55 && Projectile.ai[1] != 1f) { diff --git a/Projectiles/Rogue/CosmicKunaiProj.cs b/Projectiles/Rogue/CosmicKunaiProj.cs index acd7af3131..ce32ce7a81 100644 --- a/Projectiles/Rogue/CosmicKunaiProj.cs +++ b/Projectiles/Rogue/CosmicKunaiProj.cs @@ -1,4 +1,4 @@ -using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.alpha += (Projectile.Calamity().stealthStrike ? 11 : 17); if (Projectile.alpha >= 255) { diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index ce5a33c761..66c7e17204 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; } Projectile.velocity.Y += 0.01f; diff --git a/Projectiles/Rogue/JawsProjectile.cs b/Projectiles/Rogue/JawsProjectile.cs index 30b9149994..73a0ad5587 100644 --- a/Projectiles/Rogue/JawsProjectile.cs +++ b/Projectiles/Rogue/JawsProjectile.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] == 0f) { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.Calamity().stealthStrike) { int dustType = Utils.SelectRandom(Main.rand, new int[] diff --git a/Projectiles/Rogue/LeviathanTooth.cs b/Projectiles/Rogue/LeviathanTooth.cs index 65978469fd..8152c76780 100644 --- a/Projectiles/Rogue/LeviathanTooth.cs +++ b/Projectiles/Rogue/LeviathanTooth.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] == 0f) { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft < 575 && !Projectile.Calamity().stealthStrike) { Projectile.velocity.Y += 0.5f; diff --git a/Projectiles/Rogue/LunarKunaiProj.cs b/Projectiles/Rogue/LunarKunaiProj.cs index 8b7b39d2d1..ae1f678100 100644 --- a/Projectiles/Rogue/LunarKunaiProj.cs +++ b/Projectiles/Rogue/LunarKunaiProj.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue else Projectile.frame = 0; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, lunarEnhance ? 300f : 150f, lunarEnhance ? 12f : 8f, 20f); if (Main.rand.NextBool(6)&& lunarEnhance) Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Vortex, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); diff --git a/Projectiles/Rogue/LuxorsGiftRogue.cs b/Projectiles/Rogue/LuxorsGiftRogue.cs index 6687408ed7..c970824e1c 100644 --- a/Projectiles/Rogue/LuxorsGiftRogue.cs +++ b/Projectiles/Rogue/LuxorsGiftRogue.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.localAI[0] == 0f) { Projectile.scale -= 0.01f; diff --git a/Projectiles/Rogue/MalachiteBolt.cs b/Projectiles/Rogue/MalachiteBolt.cs index 0417dbb894..bfcae585c3 100644 --- a/Projectiles/Rogue/MalachiteBolt.cs +++ b/Projectiles/Rogue/MalachiteBolt.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.alpha -= 3; if (Projectile.alpha < 100) { diff --git a/Projectiles/Rogue/MycorootProj.cs b/Projectiles/Rogue/MycorootProj.cs index f41a2b1e11..daa7ae6dcf 100644 --- a/Projectiles/Rogue/MycorootProj.cs +++ b/Projectiles/Rogue/MycorootProj.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f); } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; Projectile.alpha += 20; if (Projectile.alpha >= 255) { diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index 7b26c79bf7..6ecd3eec6e 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; //Stealth strike behavior if (!Projectile.Calamity().stealthStrike || Projectile.owner != Main.myPlayer || Projectile.Calamity().lineColor >= 2) diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index 4d70abc4ca..e3a34b3310 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Skyware, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); } } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; Projectile.velocity.X *= 1.015f; Projectile.velocity.Y *= 1.015f; Projectile.velocity.X = Math.Min(16f, Projectile.velocity.X); diff --git a/Projectiles/Rogue/ShockGrenadeBolt.cs b/Projectiles/Rogue/ShockGrenadeBolt.cs index bd8d9600ed..e9b685a881 100644 --- a/Projectiles/Rogue/ShockGrenadeBolt.cs +++ b/Projectiles/Rogue/ShockGrenadeBolt.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft < 55) { diff --git a/Projectiles/Rogue/TheSyringeCinder.cs b/Projectiles/Rogue/TheSyringeCinder.cs index c0e224006b..7a16399617 100644 --- a/Projectiles/Rogue/TheSyringeCinder.cs +++ b/Projectiles/Rogue/TheSyringeCinder.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + ((3 * MathHelper.Pi) / 2); + Projectile.rotation = Projectile.velocity.ToRotation() + ((3 * MathHelper.Pi) / 2); Projectile.spriteDirection = ((Projectile.velocity.X > 0f) ? -1 : 1); } diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs index b590a84261..c7789a909f 100644 --- a/Projectiles/Summon/ForbiddenCircletEater.cs +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Summon dust.velocity *= 0f; dust.scale = 0.5f; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; float projX = Projectile.position.X; float projY = Projectile.position.Y; float attackDistance = 100000f; diff --git a/Projectiles/Summon/HauntedDishes.cs b/Projectiles/Summon/HauntedDishes.cs index 4299df1825..3e06fb2e60 100644 --- a/Projectiles/Summon/HauntedDishes.cs +++ b/Projectiles/Summon/HauntedDishes.cs @@ -234,7 +234,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.spriteDirection = 1; else if (Projectile.velocity.X < -0.5f) Projectile.spriteDirection = -1; - Projectile.rotation = Projectile.spriteDirection != 1 ? (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 3.14f : (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.spriteDirection != 1 ? Projectile.velocity.ToRotation() + MathHelper.Pi : Projectile.velocity.ToRotation(); } else { diff --git a/Projectiles/Summon/MiniGuardianRock.cs b/Projectiles/Summon/MiniGuardianRock.cs index 78cc3eb2d5..5f7c775d22 100644 --- a/Projectiles/Summon/MiniGuardianRock.cs +++ b/Projectiles/Summon/MiniGuardianRock.cs @@ -59,7 +59,6 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[0] == 0f) //regular expected behaviour of floaty rocks { // Rotation velocity - float minRotationVelocity = 0.5f; float rotationVelocityIncrease = 0.2f; rotationVelocityIncrease += rotationVelocityIncrease * (Projectile.ai[1] * 0.5f); diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index 63e39826e6..58e20c9a7d 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Summon else { Projectile.spriteDirection = 1; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); + Projectile.rotation = Projectile.velocity.ToRotation(); } //Homing if (Projectile.ai[0] > 20f) diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index e92d656bb6..3cc5e6e889 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -119,18 +119,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.Kill(); } - if ((double)Math.Abs(Projectile.velocity.X) > 0.2) - { - Projectile.rotation = Projectile.direction; - } - if (Projectile.velocity.X < 0f) - { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); - } - else - { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); - } + Projectile.rotation = Projectile.velocity.ToRotation(); return false; } @@ -744,7 +733,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.tileCollide = true; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity *= boomerSwarm ? 1.03f : 1.02f; int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); @@ -1027,10 +1016,10 @@ namespace CalamityMod.Projectiles.Summon } else { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 2.355f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(135f); if (Projectile.spriteDirection == -1) { - Projectile.rotation -= 1.57f; + Projectile.rotation -= MathHelper.PiOver2; } float num535 = Projectile.position.X; @@ -1135,7 +1124,7 @@ namespace CalamityMod.Projectiles.Summon { Lighting.AddLight(Projectile.Center, newColor2.ToVector3() * 0.5f); } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; int num3; for (int num979 = 0; num979 < 2; num979 = num3 + 1) { @@ -1928,18 +1917,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.tileCollide = true; } - if ((double)Math.Abs(Projectile.velocity.X) > 0.2) - { - Projectile.rotation = Projectile.direction; - } - if (Projectile.velocity.X < 0f) - { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); - } - else - { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); - } + Projectile.rotation = Projectile.velocity.ToRotation(); return false; } diff --git a/Projectiles/Summon/VileFeederProjectile.cs b/Projectiles/Summon/VileFeederProjectile.cs index 48e0f26c30..83e73f76d5 100644 --- a/Projectiles/Summon/VileFeederProjectile.cs +++ b/Projectiles/Summon/VileFeederProjectile.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Summon dust.velocity *= 0f; dust.scale = 0.5f; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) - MathHelper.PiOver2; + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; float projX = Projectile.position.X; float projY = Projectile.position.Y; float attackDistance = 100000f; diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index 993585e42d..c27d89b830 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.alpha > 0) Projectile.alpha -= 15; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft > 285) return; diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index cb380ed1e0..3271984fc2 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.alpha > 0) Projectile.alpha -= 3; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; float aiTrack = 5f; float scaleFactor = 6f; diff --git a/Projectiles/Typeless/GodKiller.cs b/Projectiles/Typeless/GodKiller.cs index 638de58148..d353152be2 100644 --- a/Projectiles/Typeless/GodKiller.cs +++ b/Projectiles/Typeless/GodKiller.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.alpha > 0) Projectile.alpha -= 5; - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.owner == Main.myPlayer && Projectile.timeLeft <= 3) { Projectile.tileCollide = false; diff --git a/Projectiles/Typeless/SkyFlareFriendly.cs b/Projectiles/Typeless/SkyFlareFriendly.cs index 1c9ce12531..13d6819e0d 100644 --- a/Projectiles/Typeless/SkyFlareFriendly.cs +++ b/Projectiles/Typeless/SkyFlareFriendly.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame = 0; } - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Lighting.AddLight(Projectile.Center, 0.7f, 0.3f, 0f); } diff --git a/UI/FlightBar/FlightBar.cs b/UI/FlightBar/FlightBar.cs index 0740309750..08c79a505d 100644 --- a/UI/FlightBar/FlightBar.cs +++ b/UI/FlightBar/FlightBar.cs @@ -228,7 +228,6 @@ namespace CalamityMod.UI if (!completedAnimation && FlightAnimFrame >= 0) { Vector2 origin = new Vector2(correctBorder.Width * 0.5f, (correctBorder.Height / FlightAnimFrames) * 0.5f); - float animOffset = 5f; float xOffset = (correctBorder.Width - flightBarAnimTexture.Width) / 2f; int frameHeight = (flightBarAnimTexture.Height / FlightAnimFrames) - 1; float yOffset = FlightAnimFrame == 0 ? 0 : ((correctBorder.Height / FlightAnimFrame) - frameHeight) / 2f; From 18b58a21d59eab02f99dbd8190f72b3b0372ba45 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:17:39 +0700 Subject: [PATCH 06/10] Asset update for dyes --- Items/Dyes/AerialiteDye.cs | 2 +- Items/Dyes/AstralBlueDye.cs | 2 +- Items/Dyes/AstralDye.cs | 2 +- Items/Dyes/AstralOrangeDye.cs | 2 +- Items/Dyes/AstralSwirlDye.cs | 2 +- Items/Dyes/AuricDye.cs | 4 ++-- Items/Dyes/BloodflareDye.cs | 2 +- Items/Dyes/BlueCosmicFlameDye.cs | 2 +- Items/Dyes/BlueStatigelDye.cs | 2 +- Items/Dyes/BrimflameDye.cs | 2 +- Items/Dyes/CalamitousDye.cs | 2 +- Items/Dyes/CeaselessDye.cs | 2 +- Items/Dyes/CosmiliteDye.cs | 2 +- Items/Dyes/CryonicDye.cs | 2 +- Items/Dyes/DefiledFlameDye.cs | 2 +- Items/Dyes/DragonSoulDye.cs | 2 +- Items/Dyes/ElementalDye.cs | 2 +- Items/Dyes/EndothermicDye.cs | 2 +- Items/Dyes/ExoDye.cs | 2 +- Items/Dyes/NecroplasmicDye.cs | 2 +- Items/Dyes/NightmareDye.cs | 2 +- Items/Dyes/PinkCosmicFlameDye.cs | 2 +- Items/Dyes/PinkStatigelDye.cs | 2 +- Items/Dyes/ProfanedFlameDye.cs | 2 +- Items/Dyes/ProfanedMoonlightDye.cs | 2 +- Items/Dyes/ReaverDye.cs | 2 +- Items/Dyes/ShadowspecDye.cs | 2 +- Items/Dyes/SlimeGodDye.cs | 2 +- Items/Dyes/StratusDye.cs | 2 +- Items/Dyes/SwirlingCosmicFlameDye.cs | 2 +- Items/Weapons/Melee/Roxcalibur.cs | 2 +- Items/Weapons/Ranged/DeadSunsWind.cs | 4 ++-- Items/Weapons/Ranged/HalleysInferno.cs | 4 ++-- Projectiles/Melee/RoxcaliburProj.cs | 2 +- Projectiles/Ranged/PhotovisceratorHoldout.cs | 4 ++-- 35 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Items/Dyes/AerialiteDye.cs b/Items/Dyes/AerialiteDye.cs index 82ba14bdc8..c79e33ffbf 100644 --- a/Items/Dyes/AerialiteDye.cs +++ b/Items/Dyes/AerialiteDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class AerialiteDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AerialiteDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AerialiteDyeShader"), "DyePass"). UseColor(new Color(153, 200, 193)).UseSecondaryColor(new Color(236, 244, 213)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/AstralBlueDye.cs b/Items/Dyes/AstralBlueDye.cs index 228964ac7d..bbd2493650 100644 --- a/Items/Dyes/AstralBlueDye.cs +++ b/Items/Dyes/AstralBlueDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class AstralBlueDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AstralBlueDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AstralBlueDyeShader"), "DyePass"). UseColor(new Color(109, 242, 197)).UseSecondaryColor(new Color(42, 147, 154)); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/AstralDye.cs b/Items/Dyes/AstralDye.cs index c7ec46f3f0..d3ef186e68 100644 --- a/Items/Dyes/AstralDye.cs +++ b/Items/Dyes/AstralDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class AstralDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AstralDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AstralDyeShader"), "DyePass"). UseColor(new Color(123, 99, 130)).UseSecondaryColor(new Color(189, 66, 84)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/AstralOrangeDye.cs b/Items/Dyes/AstralOrangeDye.cs index 038d6502e0..31a185e49c 100644 --- a/Items/Dyes/AstralOrangeDye.cs +++ b/Items/Dyes/AstralOrangeDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class AstralOrangeDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AstralOrangeDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AstralOrangeDyeShader"), "DyePass"). UseColor(new Color(255, 166, 94)).UseSecondaryColor(new Color(238, 93, 82)); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/AstralSwirlDye.cs b/Items/Dyes/AstralSwirlDye.cs index 8247b06930..a72c796fa1 100644 --- a/Items/Dyes/AstralSwirlDye.cs +++ b/Items/Dyes/AstralSwirlDye.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Dyes { public class AstralSwirlDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AstralSwirlDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AstralSwirlDyeShader"), "DyePass"). UseColor(new Color(42, 147, 154)).UseSecondaryColor(new Color(238, 93, 82)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/AuricDye.cs b/Items/Dyes/AuricDye.cs index c21b2620bc..0de8e802d1 100644 --- a/Items/Dyes/AuricDye.cs +++ b/Items/Dyes/AuricDye.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Items.Dyes { public class AuricDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/AuricDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). - UseColor(new Color(170, 96, 60)).UseSecondaryColor(new Color(226, 196, 106)).SetShaderTextureArmor(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/SharpNoise", AssetRequestMode.ImmediateLoad)); + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/AuricDyeShader"), "DyePass"). + UseColor(new Color(170, 96, 60)).UseSecondaryColor(new Color(226, 196, 106)).SetShaderTextureArmor(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/SharpNoise")); public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; diff --git a/Items/Dyes/BloodflareDye.cs b/Items/Dyes/BloodflareDye.cs index 6b3756cf31..3fd574d142 100644 --- a/Items/Dyes/BloodflareDye.cs +++ b/Items/Dyes/BloodflareDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class BloodflareDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/BloodflareDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/BloodflareDyeShader"), "DyePass"). UseColor(new Color(122, 10, 60)).UseSecondaryColor(new Color(219, 102, 106)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/BlueCosmicFlameDye.cs b/Items/Dyes/BlueCosmicFlameDye.cs index 4e4b16743c..8dc622dd73 100644 --- a/Items/Dyes/BlueCosmicFlameDye.cs +++ b/Items/Dyes/BlueCosmicFlameDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class BlueCosmicFlameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader"), "DyePass"). UseColor(new Color(52, 212, 229)).UseSecondaryColor(new Color(52, 212, 229)).UseImage("Images/Misc/noise").UseSaturation(0f); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/BlueStatigelDye.cs b/Items/Dyes/BlueStatigelDye.cs index bb4dffd55e..41980c70b0 100644 --- a/Items/Dyes/BlueStatigelDye.cs +++ b/Items/Dyes/BlueStatigelDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class BlueStatigelDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader"), "DyePass"). UseColor(new Color(80, 170, 206)).UseSecondaryColor(new Color(81, 87, 119)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/BrimflameDye.cs b/Items/Dyes/BrimflameDye.cs index e5ce035f0f..a73183ac1f 100644 --- a/Items/Dyes/BrimflameDye.cs +++ b/Items/Dyes/BrimflameDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class BrimflameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/BrimflameDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/BrimflameDyeShader"), "DyePass"). UseColor(new Color(252, 147, 34)).UseSecondaryColor(new Color(216, 41, 26)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/CalamitousDye.cs b/Items/Dyes/CalamitousDye.cs index b75c4069ec..7c6bdeef74 100644 --- a/Items/Dyes/CalamitousDye.cs +++ b/Items/Dyes/CalamitousDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class CalamitousDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CalamitousDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CalamitousDyeShader"), "DyePass"). UseColor(new Color(227, 79, 79)).UseSecondaryColor(new Color(145, 27, 135)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/CeaselessDye.cs b/Items/Dyes/CeaselessDye.cs index 45399c642e..42544392b3 100644 --- a/Items/Dyes/CeaselessDye.cs +++ b/Items/Dyes/CeaselessDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class CeaselessDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CeaselessDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"); + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CeaselessDyeShader"), "DyePass"); public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; diff --git a/Items/Dyes/CosmiliteDye.cs b/Items/Dyes/CosmiliteDye.cs index 3e4b6f5d72..ea020175c2 100644 --- a/Items/Dyes/CosmiliteDye.cs +++ b/Items/Dyes/CosmiliteDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class CosmiliteDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CosmiliteDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CosmiliteDyeShader"), "DyePass"). UseColor(new Color(154, 140, 191)).UseSecondaryColor(new Color(249, 109, 235)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/CryonicDye.cs b/Items/Dyes/CryonicDye.cs index e802e10642..b30a59f52d 100644 --- a/Items/Dyes/CryonicDye.cs +++ b/Items/Dyes/CryonicDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class CryonicDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CryonicDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CryonicDyeShader"), "DyePass"). UseColor(new Color(138, 225, 255)).UseSecondaryColor(new Color(90, 90, 204)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/DefiledFlameDye.cs b/Items/Dyes/DefiledFlameDye.cs index 969b608450..11d4367612 100644 --- a/Items/Dyes/DefiledFlameDye.cs +++ b/Items/Dyes/DefiledFlameDye.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Dyes { public class DefiledFlameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/DefiledFlameDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/DefiledFlameDyeShader"), "DyePass"). UseColor(new Color(106, 190, 48)).UseSecondaryColor(new Color(204, 248, 48)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/DragonSoulDye.cs b/Items/Dyes/DragonSoulDye.cs index ed8871ffa4..70db1abca8 100644 --- a/Items/Dyes/DragonSoulDye.cs +++ b/Items/Dyes/DragonSoulDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class DragonSoulDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/DragonSoulDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"); + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/DragonSoulDyeShader"), "DyePass"); public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; diff --git a/Items/Dyes/ElementalDye.cs b/Items/Dyes/ElementalDye.cs index 7f289c7822..6bd1a311a2 100644 --- a/Items/Dyes/ElementalDye.cs +++ b/Items/Dyes/ElementalDye.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Dyes { public class ElementalDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ElementalDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass").UseImage("Images/Misc/Perlin"); + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ElementalDyeShader"), "DyePass").UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; diff --git a/Items/Dyes/EndothermicDye.cs b/Items/Dyes/EndothermicDye.cs index 044768bbce..2209ece7a6 100644 --- a/Items/Dyes/EndothermicDye.cs +++ b/Items/Dyes/EndothermicDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class EndothermicDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/EndothermicDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/EndothermicDyeShader"), "DyePass"). UseColor(new Color(123, 205, 237)).UseSecondaryColor(new Color(85, 85, 171)); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/ExoDye.cs b/Items/Dyes/ExoDye.cs index 41c57a208f..6c6c61cbce 100644 --- a/Items/Dyes/ExoDye.cs +++ b/Items/Dyes/ExoDye.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Dyes { public override ArmorShaderData ShaderDataToBind { - get => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ExoDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass").UseImage("Images/Misc/Perlin"); + get => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ExoDyeShader"), "DyePass").UseImage("Images/Misc/Perlin"); } public override void SafeSetStaticDefaults() diff --git a/Items/Dyes/NecroplasmicDye.cs b/Items/Dyes/NecroplasmicDye.cs index fcec182ae5..7591885281 100644 --- a/Items/Dyes/NecroplasmicDye.cs +++ b/Items/Dyes/NecroplasmicDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes [LegacyName("PhantoplasmDye")] public class NecroplasmicDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/NecroplasmicDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/NecroplasmicDyeShader"), "DyePass"). UseColor(new Color(245, 143, 182)).UseSecondaryColor(new Color(119, 238, 255)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() diff --git a/Items/Dyes/NightmareDye.cs b/Items/Dyes/NightmareDye.cs index a9aa8402a6..0363f95a00 100644 --- a/Items/Dyes/NightmareDye.cs +++ b/Items/Dyes/NightmareDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class NightmareDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/NightmareDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/NightmareDyeShader"), "DyePass"). UseColor(new Color(249, 81, 0)).UseSecondaryColor(new Color(255, 203, 106)); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/PinkCosmicFlameDye.cs b/Items/Dyes/PinkCosmicFlameDye.cs index 925808775b..91fefe5734 100644 --- a/Items/Dyes/PinkCosmicFlameDye.cs +++ b/Items/Dyes/PinkCosmicFlameDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class PinkCosmicFlameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader"), "DyePass"). UseColor(new Color(255, 115, 221)).UseSecondaryColor(new Color(255, 115, 221)).UseImage("Images/Misc/noise").UseSaturation(0f); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/PinkStatigelDye.cs b/Items/Dyes/PinkStatigelDye.cs index d91d37a6d9..85581e23fc 100644 --- a/Items/Dyes/PinkStatigelDye.cs +++ b/Items/Dyes/PinkStatigelDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class PinkStatigelDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader"), "DyePass"). UseColor(new Color(249, 129, 185)).UseSecondaryColor(new Color(131, 58, 103)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/ProfanedFlameDye.cs b/Items/Dyes/ProfanedFlameDye.cs index 182d3af693..cbb8be5523 100644 --- a/Items/Dyes/ProfanedFlameDye.cs +++ b/Items/Dyes/ProfanedFlameDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class ProfanedFlameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ProfanedFlameDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ProfanedFlameDyeShader"), "DyePass"). UseColor(new Color(255, 191, 73)).UseSecondaryColor(new Color(255, 255, 186)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/ProfanedMoonlightDye.cs b/Items/Dyes/ProfanedMoonlightDye.cs index 7fcf1f715f..3292d085fa 100644 --- a/Items/Dyes/ProfanedMoonlightDye.cs +++ b/Items/Dyes/ProfanedMoonlightDye.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Dyes { public class ProfanedMoonlightDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ProfanedMoonlightDye", AssetRequestMode.ImmediateLoad).Value), "DyePass"); + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ProfanedMoonlightDye"), "DyePass"); public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; diff --git a/Items/Dyes/ReaverDye.cs b/Items/Dyes/ReaverDye.cs index 76d97dfb86..1c6cebc090 100644 --- a/Items/Dyes/ReaverDye.cs +++ b/Items/Dyes/ReaverDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class ReaverDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ReaverDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ReaverDyeShader"), "DyePass"). UseColor(new Color(54, 164, 66)).UseSecondaryColor(new Color(224, 115, 65)); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/ShadowspecDye.cs b/Items/Dyes/ShadowspecDye.cs index de232f5f93..f0986a270d 100644 --- a/Items/Dyes/ShadowspecDye.cs +++ b/Items/Dyes/ShadowspecDye.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Dyes { public class ShadowspecDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/ShadowspecDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/ShadowspecDyeShader"), "DyePass"). UseColor(new Color(46, 27, 60)).UseSecondaryColor(new Color(132, 142, 191)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/SlimeGodDye.cs b/Items/Dyes/SlimeGodDye.cs index 53f5a5fa3e..787ee03fa9 100644 --- a/Items/Dyes/SlimeGodDye.cs +++ b/Items/Dyes/SlimeGodDye.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Dyes { public class SlimeGodDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/SlimeGodDyeShader"), "DyePass"). UseColor(new Color(80, 170, 206)).UseSecondaryColor(new Color(131, 58, 103)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/StratusDye.cs b/Items/Dyes/StratusDye.cs index f50cb97277..e1eb845d40 100644 --- a/Items/Dyes/StratusDye.cs +++ b/Items/Dyes/StratusDye.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Dyes { public class StratusDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/StratusDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/StratusDyeShader"), "DyePass"). UseColor(new Color(36, 86, 163)).UseSecondaryColor(new Color(124, 204, 223)).UseImage("Images/Misc/Perlin"); public override void SafeSetStaticDefaults() { diff --git a/Items/Dyes/SwirlingCosmicFlameDye.cs b/Items/Dyes/SwirlingCosmicFlameDye.cs index 965c99ca4d..73493fadce 100644 --- a/Items/Dyes/SwirlingCosmicFlameDye.cs +++ b/Items/Dyes/SwirlingCosmicFlameDye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes { public class SwirlingCosmicFlameDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/CosmicFlameShader"), "DyePass"). UseColor(new Color(52, 212, 229)).UseSecondaryColor(new Color(255, 115, 221)).UseImage("Images/Misc/noise").UseSaturation(1f); public override void SafeSetStaticDefaults() { diff --git a/Items/Weapons/Melee/Roxcalibur.cs b/Items/Weapons/Melee/Roxcalibur.cs index d99aa83d0c..7f61edbd24 100644 --- a/Items/Weapons/Melee/Roxcalibur.cs +++ b/Items/Weapons/Melee/Roxcalibur.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee public class Roxcalibur : ModItem, ILocalizedModType { - public string LocalizationCategory => "Items.Weapons.Melee"; + public new string LocalizationCategory => "Items.Weapons.Melee"; public static int BaseUseTime = 40; public override void SetDefaults() diff --git a/Items/Weapons/Ranged/DeadSunsWind.cs b/Items/Weapons/Ranged/DeadSunsWind.cs index e82e5d4887..629a9a0dcb 100644 --- a/Items/Weapons/Ranged/DeadSunsWind.cs +++ b/Items/Weapons/Ranged/DeadSunsWind.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/DeadSunShot") { PitchVariance = 0.35f, Volume = 0.4f }; + public static readonly SoundStyle ShootSound = new("CalamityMod/Sounds/Item/DeadSunShot") { PitchVariance = 0.35f, Volume = 0.4f }; public static readonly SoundStyle Ricochet = new("CalamityMod/Sounds/Item/DeadSunRicochet") { Volume = 0.35f }; public static readonly SoundStyle Explosion = new("CalamityMod/Sounds/Item/DeadSunExplosion") { Volume = 0.5f }; public override void SetDefaults() @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.UseSound = Shoot; + Item.UseSound = ShootSound; Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index d3695d38cc..a537d6413d 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.68f }; + public static readonly SoundStyle ShootSound = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.68f }; public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.75f }; public override void SetDefaults() { @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.UseSound = Shoot; + Item.UseSound = ShootSound; Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.rare = ModContent.RarityType(); } diff --git a/Projectiles/Melee/RoxcaliburProj.cs b/Projectiles/Melee/RoxcaliburProj.cs index ceb38dfe15..95c9986049 100644 --- a/Projectiles/Melee/RoxcaliburProj.cs +++ b/Projectiles/Melee/RoxcaliburProj.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee { public class RoxcaliburProj : ModProjectile, ILocalizedModType { - public string LocalizationCategory => "Projectiles.Melee"; + public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Items/Weapons/Melee/Roxcalibur"; diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index 85eb9a3f5a..be9c254ca0 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Ranged SquishyLightParticle exoEnergy = new(position, (Projectile.velocity * 3).RotatedByRandom(0.4f) * Main.rand.NextFloat(0.3f, 1.6f), 0.9f, sparkColor, 60); GeneralParticleHandler.SpawnParticle(exoEnergy); } - SoundEngine.PlaySound(DeadSunsWind.Shoot with { Volume = 1.9f }, Owner.MountedCenter); + SoundEngine.PlaySound(DeadSunsWind.ShootSound with { Volume = 1.9f }, Owner.MountedCenter); } Dust dust = Dust.NewDustPerfect(position, 263, (Projectile.velocity * 10).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.6f)); @@ -223,7 +223,7 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(1.3f, 1.8f); dust.color = sparkColor; } - SoundEngine.PlaySound(HalleysInferno.Shoot with { Volume = 0.4f }, Owner.MountedCenter); + SoundEngine.PlaySound(HalleysInferno.ShootSound with { Volume = 0.4f }, Owner.MountedCenter); int rightClickDamage = (int)(0.5f * damage); Projectile.NewProjectile(source, position, velocity, ProjectileType(), rightClickDamage, knockback, Projectile.owner); From f6296f3e63d3cf977de92a416b21927c18410723 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 4 Apr 2024 12:45:30 -0400 Subject: [PATCH 07/10] Aerialite Bar resprite --- Items/Materials/AerialiteBar.png | Bin 331 -> 524 bytes Tiles/AerialiteBarTile.png | Bin 226 -> 339 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Items/Materials/AerialiteBar.png b/Items/Materials/AerialiteBar.png index 1f020023f9d301c7447711a958aac576ce9cc153..f4d39aa5e79d42de9dd09b4b9f68b0e28e3f0731 100644 GIT binary patch delta 498 zcmVtSHt@_&~c1+IV8QA5vot5qE} z%b;?XE zScaqt^B9m#>(!&Wu-72TsqI0X6yk|pq--wDNPH7Pr11s@hS$)1Yr~BViKn1howRI5 zmFC%?q2sd%@_!@#f;ZEZ0 ze1$aLfXmed18%<$8${0p>5kZt<^Db7Yw8K9$Nw=96CbmkS>+whXMkr+Y`5C?f;7SA z{8kY2+=6TdK6{!bidLjMj=7y8;YfCv6?WLCm)m*Diootchri383`&_+mlY zuqA-OA{@xq4JqsU`SRzV8k+(v!hxgdwz3~s69R8>7-uYp0fb2a0000_ZpZ!bP|$27#JkLB>kds zB1TF0000< KMNUMnLSTa9Ykffg delta 198 zcmV;%06G8D0^$LXB!3BTNLh0L01FZT01FZU(%pXi0001#Nkln7FA^4j5C Date: Thu, 4 Apr 2024 12:53:08 -0400 Subject: [PATCH 08/10] salute react this message --- Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index 0409588fb3..0129ce79f2 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -73,7 +73,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "CrabBar", "Dia", "Done", - "DylanDoe21", "Fluffi", "HaguriHat", "Heart Plus Up!", @@ -125,6 +124,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Doog", "drh", "dwshin", + "DylanDoe21", "Earth", "EchoDuck", "Ein", From 2aa82581ceb3d52767e160a839dc27bd21ffeced Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 4 Apr 2024 19:05:11 -0400 Subject: [PATCH 09/10] Changed Murasama to Dark Blue rarity --- Items/Weapons/Melee/Murasama.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index cc038d5078..a67573faed 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults From d5b0f6cca59d1db4f215b4ea6f62c1713af87d86 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 4 Apr 2024 21:06:06 -0400 Subject: [PATCH 10/10] Changed a bunch of accessory rarities Also internally renamed GodlySoulArtifact to AuricSoulArtifact --- Items/Accessories/AbyssalAmulet.cs | 2 +- Items/Accessories/AlluringBait.cs | 2 +- ...lySoulArtifact.cs => AuricSoulArtifact.cs} | 3 ++- ...SoulArtifact.png => AuricSoulArtifact.png} | Bin Items/Accessories/DeadshotBrooch.cs | 2 +- Items/Accessories/DeepDiver.cs | 2 +- Items/Accessories/HowlsHeart.cs | 2 +- Items/Accessories/SilencingSheath.cs | 2 +- Items/Accessories/StatisBlessing.cs | 2 +- Items/Accessories/TheCamper.cs | 2 +- Items/Ammo/CinderArrow.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 18 +++++++++--------- 12 files changed, 20 insertions(+), 19 deletions(-) rename Items/Accessories/{GodlySoulArtifact.cs => AuricSoulArtifact.cs} (91%) rename Items/Accessories/{GodlySoulArtifact.png => AuricSoulArtifact.png} (100%) diff --git a/Items/Accessories/AbyssalAmulet.cs b/Items/Accessories/AbyssalAmulet.cs index bd6d564380..65ad1b7091 100644 --- a/Items/Accessories/AbyssalAmulet.cs +++ b/Items/Accessories/AbyssalAmulet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories Item.width = 26; Item.height = 26; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; + Item.rare = ItemRarityID.Green; Item.accessory = true; } diff --git a/Items/Accessories/AlluringBait.cs b/Items/Accessories/AlluringBait.cs index 272fd89f65..b6d96daabd 100644 --- a/Items/Accessories/AlluringBait.cs +++ b/Items/Accessories/AlluringBait.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories Item.width = 26; Item.height = 26; Item.value = CalamityGlobalItem.Rarity1BuyPrice; - Item.rare = ItemRarityID.Blue; + Item.rare = ItemRarityID.Green; Item.accessory = true; } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/AuricSoulArtifact.cs similarity index 91% rename from Items/Accessories/GodlySoulArtifact.cs rename to Items/Accessories/AuricSoulArtifact.cs index aeb9b1fc10..10372e199d 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/AuricSoulArtifact.cs @@ -9,7 +9,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class GodlySoulArtifact : ModItem, ILocalizedModType + [LegacyName("GodlySoulArtifact")] + public class AuricSoulArtifact : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; public override void SetDefaults() diff --git a/Items/Accessories/GodlySoulArtifact.png b/Items/Accessories/AuricSoulArtifact.png similarity index 100% rename from Items/Accessories/GodlySoulArtifact.png rename to Items/Accessories/AuricSoulArtifact.png diff --git a/Items/Accessories/DeadshotBrooch.cs b/Items/Accessories/DeadshotBrooch.cs index 34016c2470..eb3f4e25f0 100644 --- a/Items/Accessories/DeadshotBrooch.cs +++ b/Items/Accessories/DeadshotBrooch.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories Item.width = 46; Item.height = 40; Item.value = CalamityGlobalItem.Rarity8BuyPrice; - Item.rare = ItemRarityID.Yellow; + Item.rare = ItemRarityID.Lime; Item.accessory = true; } diff --git a/Items/Accessories/DeepDiver.cs b/Items/Accessories/DeepDiver.cs index d4d6f1c119..2568be7bfb 100644 --- a/Items/Accessories/DeepDiver.cs +++ b/Items/Accessories/DeepDiver.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories Item.width = 24; Item.height = 28; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Pink; + Item.rare = ItemRarityID.LightRed; Item.accessory = true; } diff --git a/Items/Accessories/HowlsHeart.cs b/Items/Accessories/HowlsHeart.cs index 08146bdccf..18ff5cf8c3 100644 --- a/Items/Accessories/HowlsHeart.cs +++ b/Items/Accessories/HowlsHeart.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; Item.value = CalamityGlobalItem.Rarity4BuyPrice; - Item.rare = ItemRarityID.Red; + Item.rare = ItemRarityID.LightRed; Item.Calamity().donorItem = true; } diff --git a/Items/Accessories/SilencingSheath.cs b/Items/Accessories/SilencingSheath.cs index 0bfbad71c6..ce9a072b11 100644 --- a/Items/Accessories/SilencingSheath.cs +++ b/Items/Accessories/SilencingSheath.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories Item.width = 32; Item.height = 34; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; + Item.rare = ItemRarityID.Green; Item.accessory = true; } diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index 8e01b530f4..c48127c63a 100644 --- a/Items/Accessories/StatisBlessing.cs +++ b/Items/Accessories/StatisBlessing.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories Item.width = 28; Item.height = 32; Item.value = CalamityGlobalItem.Rarity7BuyPrice; - Item.rare = ItemRarityID.Lime; + Item.rare = ItemRarityID.Yellow; Item.accessory = true; } diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs index 8f691da792..22c12fa2cf 100644 --- a/Items/Accessories/TheCamper.cs +++ b/Items/Accessories/TheCamper.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories Item.width = 26; Item.height = 26; Item.value = CalamityGlobalItem.Rarity7BuyPrice; - Item.rare = ItemRarityID.Lime; + Item.rare = ItemRarityID.Yellow; Item.accessory = true; Item.defense = 10; } diff --git a/Items/Ammo/CinderArrow.cs b/Items/Ammo/CinderArrow.cs index ed7a209e33..ffe4a68740 100644 --- a/Items/Ammo/CinderArrow.cs +++ b/Items/Ammo/CinderArrow.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 1.5f; Item.value = Item.sellPrice(copper: 12); - Item.rare = ItemRarityID.LightRed; + Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 13f; Item.ammo = AmmoID.Arrow; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 8b6cb00f8e..e051656d0d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -258,6 +258,15 @@ AsgardsValor: { ''' } +AuricSoulArtifact: { + DisplayName: Auric Soul Artifact + Tooltip: + ''' + For each Fiery Draconid you have summoned, you gain 1 minion slot + Loyalty + ''' +} + BadgeofBravery: { DisplayName: Badge of Bravery Tooltip: @@ -845,15 +854,6 @@ GloveOfRecklessness: { ''' } -GodlySoulArtifact: { - DisplayName: Auric Soul Artifact - Tooltip: - ''' - For each Fiery Draconid you have summoned, you gain 1 minion slot - Loyalty - ''' -} - GrandGelatin: { DisplayName: Grand Gelatin Tooltip: