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

◆ GetScarabBombDigDirectionSnap8()

Point Terraria.Projectile.GetScarabBombDigDirectionSnap8 ( )
inlineprivate

Definition at line 77830 of file Projectile.cs.

77831 {
77832 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
77833 //IL_0014: Unknown result type (might be due to invalid IL or missing references)
77834 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
77835 //IL_001c: Unknown result type (might be due to invalid IL or missing references)
77836 //IL_002d: Unknown result type (might be due to invalid IL or missing references)
77837 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
77838 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
77839 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
77840 //IL_0076: Unknown result type (might be due to invalid IL or missing references)
77841 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
77842 Player player = Main.player[owner];
77843 Vector2 vector = DirectionTo(player.Center);
77844 Point result = default(Point);
77845 ((Point)(ref result))._002Ector((!(vector.X > 0f)) ? 1 : (-1), (!(vector.Y > 0f)) ? 1 : (-1));
77846 if (Math.Abs(vector.X) > Math.Abs(vector.Y) * 2f)
77847 {
77848 result.Y = 0;
77849 }
77850 else if (Math.Abs(vector.Y) > Math.Abs(vector.X) * 2f)
77851 {
77852 result.X = 0;
77853 }
77854 return result;
77855 }
Vector2 DirectionTo(Vector2 Destination)
Definition Entity.cs:289
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...

References Terraria.Entity.Center, and Terraria.Main.player.