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

◆ TryAllowingSnappingToPosition()

void Terraria.Player.TryAllowingSnappingToPosition ( ref bool canSnapToPosition,
Vector2 pos1,
Vector2 pos2 )
inlineprivate

Definition at line 31620 of file Player.cs.

31621 {
31622 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
31623 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
31624 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
31625 //IL_0024: Unknown result type (might be due to invalid IL or missing references)
31626 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
31627 //IL_0038: Unknown result type (might be due to invalid IL or missing references)
31628 //IL_0039: Unknown result type (might be due to invalid IL or missing references)
31629 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
31630 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
31631 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
31632 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
31633 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
31634 //IL_0079: Unknown result type (might be due to invalid IL or missing references)
31635 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
31636 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
31637 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
31638 Vector2 vector = default(Vector2);
31639 ((Vector2)(ref vector))._002Ector((float)(width - 2), 0f);
31640 canSnapToPosition = Collision.CanHit(pos1 + vector, 2, height, pos2, 2, height);
31641 if (!canSnapToPosition)
31642 {
31643 canSnapToPosition = Collision.CanHit(pos1 + vector, 2, height, pos2 + vector, 2, height);
31644 }
31645 if (!canSnapToPosition)
31646 {
31647 canSnapToPosition = Collision.CanHit(pos1, 2, height, pos2, 2, height);
31648 }
31649 if (!canSnapToPosition)
31650 {
31651 canSnapToPosition = Collision.CanHit(pos1, 2, height, pos2 + vector, 2, height);
31652 }
31653 }
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51

References Terraria.Collision.CanHit(), Terraria.Entity.height, and Terraria.Entity.width.

Referenced by Terraria.Player.CanSnapToPosition().

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