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

◆ TryFindingFloor()

static ? float Terraria.NPC.TryFindingFloor ( Vector2 searchStartPositionInWorld,
int searchRange,
out int tilesTraveled )
inlinestaticprivate

Definition at line 45352 of file NPC.cs.

45353 {
45354 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
45355 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
45356 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
45357 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
45358 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
45359 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
45360 //IL_0075: Unknown result type (might be due to invalid IL or missing references)
45361 Point point = searchStartPositionInWorld.ToTileCoordinates();
45362 int x = point.X;
45363 for (int i = point.Y; i < point.Y + searchRange; i++)
45364 {
45365 if (Main.tile[x, i] == null)
45366 {
45367 Main.tile[x, i] = default(Tile);
45368 }
45369 if (Main.tile[x, i].nactive() && Main.tileSolid[Main.tile[x, i].type])
45370 {
45371 tilesTraveled = i - point.Y;
45372 return i;
45373 }
45374 }
45375 tilesTraveled = 0;
45376 return null;
45377 }

References Terraria.Main.tile, and Terraria.Main.tileSolid.

Referenced by Terraria.NPC.AI_124_DeerclopsLeg().

+ Here is the caller graph for this function: