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

◆ GetFarthestSpawnPositionOnLine()

Vector2 Terraria.Player.GetFarthestSpawnPositionOnLine ( Vector2 startPos,
float speedX,
float speedY )
inline

Definition at line 50046 of file Player.cs.

50047 {
50048 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
50049 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
50050 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
50051 //IL_0014: Unknown result type (might be due to invalid IL or missing references)
50052 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
50053 //IL_0026: Unknown result type (might be due to invalid IL or missing references)
50054 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
50055 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
50056 //IL_0036: Unknown result type (might be due to invalid IL or missing references)
50057 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
50058 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
50059 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
50060 //IL_004c: Unknown result type (might be due to invalid IL or missing references)
50061 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
50062 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
50063 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
50064 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
50065 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
50066 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
50067 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
50068 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
50069 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
50070 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
50071 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
50072 Vector2 pointPoisition = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition;
50074 int num = 0;
50075 Vector2 val = new Vector2(speedX, speedY);
50076 float num2 = ((Vector2)(ref val)).Length();
50078 float num3 = ((Vector2)(ref val)).Length();
50079 Vector2 center = base.Center;
50080 center.X += direction * 16;
50081 while (Collision.CanHitLine(center, 0, 0, startPos, 0, 0))
50082 {
50083 num++;
50084 startPos.X += speedX;
50085 startPos.Y += speedY;
50087 if (((Vector2)(ref val)).Length() < 20f + Math.Abs(speedX) + Math.Abs(speedY))
50088 {
50090 break;
50091 }
50092 if (num2 * (float)num >= num3)
50093 {
50095 break;
50096 }
50097 }
50098 return startPos;
50099 }
void LimitPointToPlayerReachableArea(ref Vector2 pointPoisition)
Definition Player.cs:45170

References Terraria.Collision.CanHitLine(), Terraria.Entity.direction, Terraria.Player.LimitPointToPlayerReachableArea(), Terraria.Main.MouseScreen, Terraria.Main.ReverseGravitySupport(), and Terraria.Main.screenPosition.

Referenced by Terraria.Player.ItemCheck_Shoot().

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