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

◆ GetBirdFlightRecommendation()

void Terraria.NPC.GetBirdFlightRecommendation ( int downScanRange,
int upRange,
Point tCoords,
out bool goDownwards,
out bool goUpwards )
inlineprivate

Definition at line 51141 of file NPC.cs.

51142 {
51143 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
51144 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
51145 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
51146 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
51147 tCoords.X += direction;
51148 goDownwards = true;
51149 goUpwards = false;
51150 int x = tCoords.X;
51151 for (int i = tCoords.Y; i < tCoords.Y + downScanRange && WorldGen.InWorld(x, i); i++)
51152 {
51153 Tile tile = Main.tile[x, i];
51154 if (tile == null)
51155 {
51156 break;
51157 }
51158 if ((tile.nactive() && Main.tileSolid[tile.type]) || tile.liquid > 0)
51159 {
51160 if (i < tCoords.Y + upRange)
51161 {
51162 goUpwards = true;
51163 }
51164 goDownwards = false;
51165 break;
51166 }
51167 }
51168 }

References Terraria.Entity.direction, Terraria.WorldGen.InWorld(), Terraria.Tile.nactive(), Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Tile.type.

Referenced by Terraria.NPC.AI_112_FairyCritter().

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