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

◆ CheckFloor()

static bool Terraria.GameContent.Events.CultistRitual.CheckFloor ( Vector2 Center,
out Point[] spawnPoints )
inlinestatic

Definition at line 93 of file CultistRitual.cs.

94 {
95 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
96 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
97 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
98 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
99 //IL_003b: Unknown result type (might be due to invalid IL or missing references)
100 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
101 //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
102 Point[] array = (Point[])(object)new Point[4];
103 int num = 0;
104 Point point = Center.ToTileCoordinates();
105 for (int i = -5; i <= 5; i += 2)
106 {
107 if (i == -1 || i == 1)
108 {
109 continue;
110 }
111 for (int j = -5; j < 12; j++)
112 {
113 int num2 = point.X + i * 2;
114 int num3 = point.Y + j;
115 if ((WorldGen.SolidTile(num2, num3) || TileID.Sets.Platforms[Framing.GetTileSafely(num2, num3).type]) && (!Collision.SolidTiles(num2 - 1, num2 + 1, num3 - 3, num3 - 1) || (!Collision.SolidTiles(num2, num2, num3 - 3, num3 - 1) && !Collision.SolidTiles(num2 + 1, num2 + 1, num3 - 3, num3 - 2) && !Collision.SolidTiles(num2 - 1, num2 - 1, num3 - 3, num3 - 2))))
116 {
117 array[num++] = new Point(num2, num3);
118 break;
119 }
120 }
121 }
122 if (num != 4)
123 {
124 spawnPoints = null;
125 return false;
126 }
127 spawnPoints = array;
128 return true;
129 }
static bool[] Platforms
Definition TileID.cs:219

References Terraria.Framing.GetTileSafely(), Terraria.ID.TileID.Sets.Platforms, Terraria.WorldGen.SolidTile(), and Terraria.Collision.SolidTiles().

Referenced by Terraria.GameContent.Events.CultistRitual.CheckRitual(), and Terraria.NPC.VanillaAI_Inner().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: