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

◆ FindSentryRestingSpot()

void Terraria.Player.FindSentryRestingSpot ( int checkProj,
out int worldX,
out int worldY,
out int pushYUp )
inline

Definition at line 53599 of file Player.cs.

53600 {
53601 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
53602 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
53603 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
53604 //IL_001b: Unknown result type (might be due to invalid IL or missing references)
53605 bool flag = false;
53606 Vector2 pointPoisition = Main.MouseWorld;
53608 int num = (int)pointPoisition.X / 16;
53609 int i = (int)pointPoisition.Y / 16;
53610 worldX = num * 16 + 8;
53611 pushYUp = 41;
53612 switch (checkProj)
53613 {
53614 case 663:
53615 worldX += direction;
53616 break;
53617 case 665:
53618 pushYUp += 2;
53619 break;
53620 case 667:
53621 pushYUp += 3;
53622 break;
53623 case 677:
53624 worldX += direction;
53625 break;
53626 case 678:
53627 worldX += direction;
53628 break;
53629 case 691:
53630 case 692:
53631 case 693:
53632 pushYUp = 20;
53633 worldX += direction;
53634 pushYUp += 2;
53635 break;
53636 }
53637 if (!flag)
53638 {
53639 for (; i < Main.maxTilesY - 10 && Main.tile[num, i] != null && !WorldGen.SolidTile2(num, i) && Main.tile[num - 1, i] != null && !WorldGen.SolidTile2(num - 1, i) && Main.tile[num + 1, i] != null && !WorldGen.SolidTile2(num + 1, i); i++)
53640 {
53641 }
53642 i++;
53643 }
53644 i--;
53645 pushYUp -= 14;
53646 worldY = i * 16;
53647 }
void LimitPointToPlayerReachableArea(ref Vector2 pointPoisition)
Definition Player.cs:45170

References Terraria.Entity.direction, Terraria.Player.LimitPointToPlayerReachableArea(), Terraria.Main.MouseWorld, Terraria.WorldGen.SolidTile2(), and Terraria.Main.tile.

Referenced by Terraria.Player.ItemCheck_CheckCanUse(), and Terraria.Player.ItemCheck_Shoot().

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