From 552caceaae7bb8a67b057201885fcf6c611ca7ef Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 21 Feb 2020 20:48:44 -0500 Subject: [PATCH 1/2] sand elemental dmg type fixes --- Projectiles/Summon/SandBolt.cs | 1 + Projectiles/Summon/SandElementalMinion.cs | 4 ++-- Projectiles/Summon/SandMark.cs | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projectiles/Summon/SandBolt.cs b/Projectiles/Summon/SandBolt.cs index 087e4f87b1..5daeba3b35 100644 --- a/Projectiles/Summon/SandBolt.cs +++ b/Projectiles/Summon/SandBolt.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = 1; projectile.light = 1f; projectile.timeLeft = 300; + projectile.minion = true; } public override void AI() diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index 2f4c8ed7ca..032a80a6fc 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -239,8 +239,8 @@ namespace CalamityMod.Projectiles.Summon } if (num651 > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); projectile.netUpdate = true; } if (num651 > 70f) diff --git a/Projectiles/Summon/SandMark.cs b/Projectiles/Summon/SandMark.cs index a8a121a645..dc2d685e63 100644 --- a/Projectiles/Summon/SandMark.cs +++ b/Projectiles/Summon/SandMark.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft = 900; projectile.ignoreWater = true; projectile.alpha = 255; + projectile.minion = true; projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30 - @@ -132,9 +133,7 @@ namespace CalamityMod.Projectiles.Summon projectile.localAI[1] += 1f; if (projectile.localAI[1] == 60f && projectile.owner == Main.myPlayer) { - int storm = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 1f, 0f); - Main.projectile[storm].minion = true; - Main.projectile[storm].melee = false; + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0f, 0f); } if (projectile.localAI[1] >= 120f) { From b741197a7d296b5c5373829f092c8ddeb8a8e759 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 21 Feb 2020 20:50:02 -0500 Subject: [PATCH 2/2] removed a bit of unnecessary code --- Projectiles/Summon/SandElementalMinion.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index 032a80a6fc..ea988d7a61 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -276,8 +276,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 value19 = vector46 - projectile.Center; value19.Normalize(); value19 *= scaleFactor3; - int num659 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num659].timeLeft = 300; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f); projectile.netUpdate = true; } }