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

◆ WouldSpotOverlapWithSentry()

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

Definition at line 49520 of file Player.cs.

49521 {
49522 Point value = new Point(worldX, worldY - 8);
49523 Point value2 = new Point(worldX + 16, worldY - 8);
49524 Point value3 = new Point(worldX - 16, worldY - 8);
49525 bool result = false;
49526 for (int i = 0; i < 1000; i++)
49527 {
49528 Projectile projectile = Main.projectile[i];
49529 if (projectile.active && projectile.sentry)
49530 {
49531 Rectangle hitbox = projectile.Hitbox;
49532 if (!lightningAura && hitbox.X > 30)
49533 {
49534 hitbox.X += hitbox.Width / 2;
49535 hitbox.Width = 30;
49536 hitbox.X -= hitbox.Width / 2;
49537 }
49539 {
49540 result = true;
49541 break;
49542 }
49543 }
49544 }
49545 return result;
49546 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References Terraria.Entity.active, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), Terraria.Entity.Hitbox, Terraria.Main.projectile, Terraria.Projectile.sentry, and System.value.