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

◆ ShouldWallExplode()

bool Terraria.Projectile.ShouldWallExplode ( Vector2 compareSpot,
int radius,
int minI,
int maxI,
int minJ,
int maxJ )
inline

Definition at line 66995 of file Projectile.cs.

66996 {
66997 bool result = false;
66998 for (int i = minI; i <= maxI; i++)
66999 {
67000 for (int j = minJ; j <= maxJ; j++)
67001 {
67002 float num = Math.Abs((float)i - compareSpot.X / 16f);
67003 float num2 = Math.Abs((float)j - compareSpot.Y / 16f);
67004 if (Math.Sqrt(num * num + num2 * num2) < (double)radius && Main.tile[i, j] != null && Main.tile[i, j].wall == 0)
67005 {
67006 result = true;
67007 break;
67008 }
67009 }
67010 }
67011 return result;
67012 }
static double Sqrt(double d)
static double Abs(double value)

References System.Math.Abs(), System.Math.Sqrt(), and Terraria.Main.tile.