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

◆ IsGolfShotValid()

static bool Terraria.GameContent.Golf.GolfHelper.IsGolfShotValid ( Entity golfBall,
Player player )
inlinestatic

Definition at line 648 of file GolfHelper.cs.

649 {
650 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
651 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
652 //IL_000c: Unknown result type (might be due to invalid IL or missing references)
653 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
654 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
655 //IL_0038: Unknown result type (might be due to invalid IL or missing references)
656 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
657 //IL_0052: Unknown result type (might be due to invalid IL or missing references)
658 Vector2 vector = golfBall.Center - player.Bottom;
659 if (player.direction == -1)
660 {
661 vector.X *= -1f;
662 }
663 if (vector.X >= -16f && vector.X <= 32f && vector.Y <= 16f)
664 {
665 return vector.Y >= -16f;
666 }
667 return false;
668 }

References Terraria.Entity.Bottom, and Terraria.Entity.direction.

Referenced by Terraria.Main.DrawProj_DrawNormalProjs().

+ Here is the caller graph for this function: