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

◆ WouldSpotOverlapWithSentry()

static bool Terraria.Player.WouldSpotOverlapWithSentry ( int worldX,
int worldY,
bool lightningAura )
inlinestatic

Definition at line 53560 of file Player.cs.

53561 {
53562 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
53563 //IL_0054: Unknown result type (might be due to invalid IL or missing references)
53564 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
53565 //IL_0059: Unknown result type (might be due to invalid IL or missing references)
53566 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
53567 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
53568 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
53569 //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
53570 Point value = default(Point);
53571 ((Point)(ref value))._002Ector(worldX, worldY - 8);
53572 Point value2 = default(Point);
53573 ((Point)(ref value2))._002Ector(worldX + 16, worldY - 8);
53574 Point value3 = default(Point);
53575 ((Point)(ref value3))._002Ector(worldX - 16, worldY - 8);
53576 bool result = false;
53577 for (int i = 0; i < 1000; i++)
53578 {
53579 Projectile projectile = Main.projectile[i];
53580 if (projectile.active && projectile.sentry)
53581 {
53582 Rectangle hitbox = projectile.Hitbox;
53583 if (!lightningAura && hitbox.X > 30)
53584 {
53585 hitbox.X += hitbox.Width / 2;
53586 hitbox.Width = 30;
53587 hitbox.X -= hitbox.Width / 2;
53588 }
53589 if (((Rectangle)(ref hitbox)).Contains(value) || ((Rectangle)(ref hitbox)).Contains(value2) || ((Rectangle)(ref hitbox)).Contains(value3))
53590 {
53591 result = true;
53592 break;
53593 }
53594 }
53595 }
53596 return result;
53597 }

References Terraria.Entity.active, Terraria.Entity.Hitbox, Terraria.Main.projectile, and Terraria.Projectile.sentry.

Referenced by Terraria.Player.ItemCheck_CheckCanUse().

+ Here is the caller graph for this function: