gladiator kill only procs once (some npcs suck)

somehow some npcs were doing this shit more than once (like ceaseless void dark energies) and lagging the game to shit but also giving gigaheals
This commit is contained in:
AquaSG committed 2023-01-11 01:54:21 -05:00
1 parent 044d45e24c
commit b762959044
2 files changed
+7 -2

No files matched your search

+4 -2
View File
@@ -1531,8 +1531,9 @@ namespace CalamityMod.CalPlayer
}
}
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe)
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe && target.Calamity().gladiatorOnKill)
{
target.Calamity().gladiatorOnKill = false;
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center.X, target.Center.Y, target.velocity.X / 2, target.velocity.Y / 2, ModContent.ProjectileType<GladiatorHealOrb>(), 0, 0f);
}
@@ -1774,8 +1775,9 @@ namespace CalamityMod.CalPlayer
}
}
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe)
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe && target.Calamity().gladiatorOnKill)
{
target.Calamity().gladiatorOnKill = false;
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center.X, target.Center.Y, target.velocity.X / 2, target.velocity.Y / 2, ModContent.ProjectileType<GladiatorHealOrb>(), 0, 0f);
}
+3
View File
@@ -319,6 +319,9 @@ namespace CalamityMod.NPCs
// Other Boss Rush stuff
public bool DoesNotDisappearInBossRush;
// On-Kill variables
public bool gladiatorOnKill = true;
#endregion
#region Instance Per Entity and TML 1.4 Cloning