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

◆ VolatileGelatin()

void Terraria.Player.VolatileGelatin ( Item sourceItem)
inline

Definition at line 41672 of file Player.cs.

41673 {
41674 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
41675 //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
41676 //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
41677 //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
41678 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
41679 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
41680 //IL_00be: Unknown result type (might be due to invalid IL or missing references)
41681 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
41682 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
41683 //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
41684 //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
41685 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
41686 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
41687 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
41688 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
41689 if (Main.myPlayer != whoAmI)
41690 {
41691 return;
41692 }
41694 if (volatileGelatinCounter <= 40)
41695 {
41696 return;
41697 }
41699 int damage = 65;
41700 float knockBack = 7f;
41701 float num = 640f;
41702 NPC nPC = null;
41703 for (int i = 0; i < 200; i++)
41704 {
41705 NPC nPC2 = Main.npc[i];
41706 if (nPC2 != null && nPC2.active && nPC2.CanBeChasedBy(this) && Collision.CanHit(this, nPC2))
41707 {
41708 float num2 = Vector2.Distance(nPC2.Center, base.Center);
41709 if (num2 < num)
41710 {
41711 num = num2;
41712 nPC = nPC2;
41713 }
41714 }
41715 }
41716 if (nPC != null)
41717 {
41718 Vector2 v = nPC.Center - base.Center;
41719 v = v.SafeNormalize(Vector2.Zero) * 12f;
41720 v.Y -= 1.3f;
41721 Projectile.NewProjectile(GetProjectileSource_Accessory(sourceItem), base.Center.X, base.Center.Y, v.X, v.Y, 937, damage, knockBack, whoAmI);
41722 }
41723 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
IEntitySource GetProjectileSource_Accessory(Item item)
Definition Player.cs:7866
int volatileGelatinCounter
Definition Player.cs:2203

References Terraria.Collision.CanHit(), Terraria.Player.GetProjectileSource_Accessory(), Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.npc, Terraria.Player.volatileGelatinCounter, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ApplyEquipFunctional().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: