Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PopAllAttachedProjectilesAndTakeDamageForThem()

void Terraria.NPC.PopAllAttachedProjectilesAndTakeDamageForThem ( )
inline

Definition at line 12848 of file NPC.cs.

12849 {
12851 for (int i = 0; i < 1000; i++)
12852 {
12853 Projectile projectile = Main.projectile[i];
12854 if (projectile.active && projectile.owner == Main.myPlayer && isAnNPCAttachedExplosive[projectile.type] && projectile.IsAttachedTo(this))
12855 {
12856 projectile.Kill();
12857 }
12858 }
12859 }
static bool[] IsAnNPCAttachedExplosive

References Terraria.Entity.active, Terraria.ID.ProjectileID.Sets.IsAnNPCAttachedExplosive, Terraria.Projectile.IsAttachedTo(), Terraria.Projectile.Kill(), Terraria.Main.myPlayer, Terraria.Projectile.owner, Terraria.Main.projectile, and Terraria.Projectile.type.

Referenced by Terraria.NPC.AI().