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] 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; } }