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

◆ FillWallHolesInColumn()

static int Terraria.WorldGen.FillWallHolesInColumn ( int x,
int startY,
int endY )
inlinestaticprivate

Definition at line 6028 of file WorldGen.cs.

6029 {
6030 int num = 0;
6031 x = Utils.Clamp(x, 2, Main.maxTilesX - 1 - 2);
6032 startY = Math.Max(startY, 2);
6033 endY = Math.Min(endY, Main.maxTilesY - 2);
6034 bool flag = false;
6035 for (int i = startY; i < endY; i++)
6036 {
6037 if (Main.tile[x, i].wall == 0)
6038 {
6039 if (flag)
6040 {
6041 flag = false;
6042 if (FillWallHolesInSpot(x, i, 150))
6043 {
6044 num++;
6045 }
6046 }
6047 }
6048 else
6049 {
6050 flag = true;
6051 }
6052 }
6053 return num;
6054 }
static byte Min(byte val1, byte val2)
Definition Math.cs:912
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static bool FillWallHolesInSpot(int originX, int originY, int maxWallsThreshold)
Definition WorldGen.cs:6056

References Terraria.WorldGen.FillWallHolesInSpot(), System.Math.Max(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, System.Math.Min(), and Terraria.Main.tile.

Referenced by Terraria.WorldGen.FillWallHolesInArea().