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

◆ GetPointOnSwungItemPath()

void Terraria.Player.GetPointOnSwungItemPath ( float spriteWidth,
float spriteHeight,
float normalizedPointOnPath,
float itemScale,
out Vector2 location,
out Vector2 outwardDirection )
inlineprivate

Definition at line 44068 of file Player.cs.

44069 {
44070 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
44071 //IL_0059: Unknown result type (might be due to invalid IL or missing references)
44072 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
44073 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
44074 //IL_0065: Unknown result type (might be due to invalid IL or missing references)
44075 //IL_006e: Unknown result type (might be due to invalid IL or missing references)
44076 //IL_0075: Unknown result type (might be due to invalid IL or missing references)
44077 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
44078 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
44079 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
44080 //IL_008d: Unknown result type (might be due to invalid IL or missing references)
44081 //IL_0094: Unknown result type (might be due to invalid IL or missing references)
44082 //IL_0099: Unknown result type (might be due to invalid IL or missing references)
44083 float num = (float)Math.Sqrt(spriteWidth * spriteWidth + spriteHeight * spriteHeight);
44084 float num2 = (float)(direction == 1).ToInt() * ((float)Math.PI / 2f);
44085 if (gravDir == -1f)
44086 {
44087 num2 += (float)Math.PI / 2f * (float)direction;
44088 }
44089 outwardDirection = itemRotation.ToRotationVector2().RotatedBy(3.926991f + num2);
44091 }
float itemRotation
Definition Player.cs:1664
Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation=false, bool addGfxOffY=true)
Takes an input position and returns the position adjusted to the players visual rotation and offset....
Definition Player.cs:4740
Vector2 itemLocation
Definition Player.cs:1670

References Terraria.Entity.direction, Terraria.Player.gravDir, Terraria.Player.itemLocation, Terraria.Player.itemRotation, and Terraria.Player.RotatedRelativePoint().

Referenced by Terraria.Player.ItemCheck_EmitUseVisuals(), and Terraria.Player.ProcessHitAgainstNPC().

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