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

◆ PlayerLOS()

static bool Terraria.WorldGen.PlayerLOS ( int x,
int y )
inlinestatic

Definition at line 63573 of file WorldGen.cs.

63574 {
63575 //IL_00ce: Unknown result type (might be due to invalid IL or missing references)
63576 Rectangle rectangle = default(Rectangle);
63577 ((Rectangle)(ref rectangle))._002Ector(x * 16, y * 16, 16, 16);
63578 Rectangle value = default(Rectangle);
63579 for (int i = 0; i < 255; i++)
63580 {
63581 if (Main.player[i].active)
63582 {
63583 ((Rectangle)(ref value))._002Ector((int)((double)Main.player[i].position.X + (double)Main.player[i].width * 0.5 - (double)NPC.sWidth * 0.6), (int)((double)Main.player[i].position.Y + (double)Main.player[i].height * 0.5 - (double)NPC.sHeight * 0.6), (int)((double)NPC.sWidth * 1.2), (int)((double)NPC.sHeight * 1.2));
63584 if (((Rectangle)(ref rectangle)).Intersects(value))
63585 {
63586 return true;
63587 }
63588 }
63589 }
63590 return false;
63591 }

References Terraria.Main.player, and Terraria.NPC.sWidth.

Referenced by Terraria.GameContent.Events.CultistRitual.TrySpawning(), and Terraria.GameContent.Events.MysticLogFairiesEvent.TrySpawningFairies().

+ Here is the caller graph for this function: