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

◆ GetTileVisualHitbox()

static ? Rectangle Terraria.WorldGen.GetTileVisualHitbox ( int x,
int y )
inlinestatic

Definition at line 57287 of file WorldGen.cs.

57288 {
57289 Tile tile = Main.tile[x, y];
57290 if (tile == null || !tile.nactive())
57291 {
57292 return null;
57293 }
57294 Rectangle value = new Rectangle(x * 16, y * 16, 16, 16);
57295 ushort type = tile.type;
57296 if (type == 323)
57297 {
57298 value.X += tile.frameY;
57299 }
57300 if (tile.halfBrick())
57301 {
57302 value.Y += 8;
57303 value.Height = 8;
57304 }
57305 return value;
57306 }

References Terraria.Tile.frameY, Terraria.Tile.halfBrick(), Terraria.Tile.nactive(), Terraria.Main.tile, System.type, Terraria.Tile.type, and System.value.

Referenced by Terraria.Projectile.AI_007_GrapplingHooks().