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

◆ SolidTiles() [1/4]

static bool Terraria.Collision.SolidTiles ( int startX,
int endX,
int startY,
int endY )
inlinestatic

Definition at line 2952 of file Collision.cs.

2953 {
2954 if (startX < 0)
2955 {
2956 return true;
2957 }
2958 if (endX >= Main.maxTilesX)
2959 {
2960 return true;
2961 }
2962 if (startY < 0)
2963 {
2964 return true;
2965 }
2966 if (endY >= Main.maxTilesY)
2967 {
2968 return true;
2969 }
2970 for (int i = startX; i < endX + 1; i++)
2971 {
2972 for (int j = startY; j < endY + 1; j++)
2973 {
2974 if (Main.tile[i, j] == null)
2975 {
2976 return false;
2977 }
2978 if (Main.tile[i, j].active() && !Main.tile[i, j].inActive() && Main.tileSolid[Main.tile[i, j].type] && !Main.tileSolidTop[Main.tile[i, j].type])
2979 {
2980 return true;
2981 }
2982 }
2983 }
2984 return false;
2985 }

References Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Main.tileSolidTop.