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

◆ ApplyRangeCompensation()

Vector2 Terraria.Player.ApplyRangeCompensation ( float rangeCompensation,
Vector2 startPos,
Vector2 targetPos )
inline

Definition at line 41801 of file Player.cs.

41802 {
41803 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
41804 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
41805 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
41806 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
41807 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
41808 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
41809 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
41810 //IL_0013: Unknown result type (might be due to invalid IL or missing references)
41811 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
41812 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
41813 //IL_0086: Unknown result type (might be due to invalid IL or missing references)
41814 Vector2 v = targetPos - startPos;
41815 Vector2 vector = v.SafeNormalize(Vector2.Zero);
41816 vector.Y -= 1f;
41817 float num = ((Vector2)(ref v)).Length();
41818 num = (float)Math.Pow(num / 700f, 2.0) * 700f;
41819 targetPos.Y += vector.Y * num * rangeCompensation * 1f;
41820 targetPos.X += (0f - vector.X) * num * rangeCompensation * 1f;
41821 return targetPos;
41822 }

Referenced by Terraria.Player.ItemCheck_OwnerOnlyCode().

+ Here is the caller graph for this function: