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

◆ GetFrontHandPosition()

Vector2 Terraria.Player.GetFrontHandPosition ( CompositeArmStretchAmount stretch,
float rotation )
inline

Definition at line 51433 of file Player.cs.

51434 {
51435 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
51436 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
51437 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
51438 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
51439 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
51440 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
51441 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
51442 //IL_0059: Unknown result type (might be due to invalid IL or missing references)
51443 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
51444 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
51445 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
51446 //IL_006c: Unknown result type (might be due to invalid IL or missing references)
51447 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
51448 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
51449 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
51450 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
51451 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
51452 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
51453 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
51454 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
51455 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
51456 //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
51457 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
51458 //IL_0076: Unknown result type (might be due to invalid IL or missing references)
51459 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
51460 //IL_0086: Unknown result type (might be due to invalid IL or missing references)
51461 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
51462 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
51463 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
51464 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
51465 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
51466 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
51467 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
51468 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
51469 //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
51470 //IL_0102: Unknown result type (might be due to invalid IL or missing references)
51471 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
51472 float num = rotation + (float)Math.PI / 2f;
51473 Vector2 vector = default(Vector2);
51474 ((Vector2)(ref vector))._002Ector((float)Math.Cos(num), (float)Math.Sin(num));
51475 switch (stretch)
51476 {
51477 case CompositeArmStretchAmount.Full:
51478 vector *= 10f;
51479 break;
51480 case CompositeArmStretchAmount.None:
51481 vector *= 4f;
51482 break;
51483 case CompositeArmStretchAmount.Quarter:
51484 vector *= 6f;
51485 break;
51486 case CompositeArmStretchAmount.ThreeQuarters:
51487 vector *= 8f;
51488 break;
51489 }
51490 if (direction == -1)
51491 {
51492 vector += new Vector2(4f, -2f);
51493 vector += Utils.RotatedBy(new Vector2(0f, -3f), rotation + (float)Math.PI / 2f);
51494 }
51495 else
51496 {
51497 vector += new Vector2(-4f, -2f);
51498 vector += Utils.RotatedBy(new Vector2(0f, 3f), rotation + (float)Math.PI / 2f);
51499 }
51500 return MountedCenter + vector;
51501 }
Vector2 MountedCenter
Returns the player's center adjusted for mount and step stool usage. Typically used in conjunction wi...
Definition Player.cs:3692

References Terraria.Entity.direction, Terraria.Player.MountedCenter, and Terraria.Utils.RotatedBy().

Referenced by Terraria.Player.ItemCheck_ApplyUseStyle_Inner().

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