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

◆ FixChand()

static void Terraria.WorldGen.FixChand ( int i,
int j )
inlinestatic

Definition at line 44382 of file WorldGen.cs.

44383 {
44384 int num = 0;
44385 int type = Main.tile[i, j].type;
44386 if (Main.tile[i, j].active())
44387 {
44388 if (type == 35)
44389 {
44390 num = 1;
44391 }
44392 if (type == 36)
44393 {
44394 num = 2;
44395 }
44396 if (type == 170)
44397 {
44398 num = 3;
44399 }
44400 if (type == 171)
44401 {
44402 num = 4;
44403 }
44404 if (type == 172)
44405 {
44406 num = 5;
44407 }
44408 }
44409 if (num <= 0)
44410 {
44411 return;
44412 }
44413 int num2 = i;
44414 int num3 = j;
44415 for (num2 = Main.tile[i, j].frameX / 18; num2 >= 3; num2 -= 3)
44416 {
44417 }
44418 if (num2 >= 3)
44419 {
44420 num2 -= 3;
44421 }
44422 num2 = i - num2;
44423 num3 += Main.tile[i, j].frameY / 18 * -1;
44424 for (int k = num2; k < num2 + 3; k++)
44425 {
44426 for (int l = num3; l < num3 + 3; l++)
44427 {
44428 if (Main.tile[k, l] == null)
44429 {
44430 Main.tile[k, l] = new Tile();
44431 }
44432 if (Main.tile[k, l].active() && Main.tile[k, l].type == type)
44433 {
44434 Main.tile[k, l].type = 34;
44435 Main.tile[k, l].frameY = (short)(Main.tile[k, l].frameY + num * 54);
44436 }
44437 }
44438 }
44439 }

References Terraria.DataStructures.Tile, Terraria.Main.tile, and System.type.