44442 {
44443 bool flag = true;
44444 int num = 0;
44445 for (
int i = x - 1;
i < x + 2;
i++)
44446 {
44447 for (
int j = y;
j < y + 3;
j++)
44448 {
44449 if (Main.tile[i,
j] ==
null)
44450 {
44451 Main.tile[
i,
j] =
new Tile();
44452 }
44453 if (Main.tile[i,
j].active())
44454 {
44455 flag = false;
44456 }
44457 }
44458 }
44459 if (Main.tile[x, y - 1] == null)
44460 {
44461 Main.tile[x, y - 1] =
new Tile();
44462 }
44463 if (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[Main.tile[x, y - 1].type] || Main.tileSolidTop[Main.tile[x, y - 1].type])
44464 {
44465 flag = false;
44466 }
44467 if (flag)
44468 {
44469 int num2 = style / 36 * 18 * 6;
44470 int num3 = style * 18 * 3;
44471 Main.tile[x - 1, y + num].active(active:
true);
44472 Main.tile[x - 1, y + num].frameY = (
short)
num3;
44473 Main.tile[x - 1, y + num].frameX = (
short)
num2;
44474 Main.tile[x - 1, y + num].type =
type;
44475 Main.tile[x, y + num].active(active:
true);
44476 Main.tile[x, y + num].frameY = (
short)
num3;
44477 Main.tile[x, y + num].frameX = (
short)(
num2 + 18);
44478 Main.tile[x, y + num].type =
type;
44479 Main.tile[x + 1, y + num].active(active:
true);
44480 Main.tile[x + 1, y + num].frameY = (
short)
num3;
44481 Main.tile[x + 1, y + num].frameX = (
short)(
num2 + 36);
44482 Main.tile[x + 1, y + num].type =
type;
44483 Main.tile[x - 1, y + 1 + num].active(active:
true);
44484 Main.tile[x - 1, y + 1 + num].frameY = (
short)(
num3 + 18);
44485 Main.tile[x - 1, y + 1 + num].frameX = (
short)
num2;
44486 Main.tile[x - 1, y + 1 + num].type =
type;
44487 Main.tile[x, y + 1 + num].active(active:
true);
44488 Main.tile[x, y + 1 + num].frameY = (
short)(
num3 + 18);
44489 Main.tile[x, y + 1 + num].frameX = (
short)(
num2 + 18);
44490 Main.tile[x, y + 1 + num].type =
type;
44491 Main.tile[x + 1, y + 1 + num].active(active:
true);
44492 Main.tile[x + 1, y + 1 + num].frameY = (
short)(
num3 + 18);
44493 Main.tile[x + 1, y + 1 + num].frameX = (
short)(
num2 + 36);
44494 Main.tile[x + 1, y + 1 + num].type =
type;
44495 Main.tile[x - 1, y + 2 + num].active(active:
true);
44496 Main.tile[x - 1, y + 2 + num].frameY = (
short)(
num3 + 36);
44497 Main.tile[x - 1, y + 2 + num].frameX = (
short)
num2;
44498 Main.tile[x - 1, y + 2 + num].type =
type;
44499 Main.tile[x, y + 2 + num].active(active:
true);
44500 Main.tile[x, y + 2 + num].frameY = (
short)(
num3 + 36);
44501 Main.tile[x, y + 2 + num].frameX = (
short)(
num2 + 18);
44502 Main.tile[x, y + 2 + num].type =
type;
44503 Main.tile[x + 1, y + 2 + num].active(active:
true);
44504 Main.tile[x + 1, y + 2 + num].frameY = (
short)(
num3 + 36);
44505 Main.tile[x + 1, y + 2 + num].frameX = (
short)(
num2 + 36);
44506 Main.tile[x + 1, y + 2 + num].type =
type;
44507 }
44508 }