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

◆ AI_156_GetIdlePosition()

void Terraria.Projectile.AI_156_GetIdlePosition ( int stackedIndex,
int totalIndexes,
out Vector2 idleSpot,
out float idleRotation )
inlineprivate

Definition at line 54643 of file Projectile.cs.

54644 {
54645 //IL_0031: Unknown result type (might be due to invalid IL or missing references)
54646 //IL_0036: Unknown result type (might be due to invalid IL or missing references)
54647 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
54648 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
54649 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
54650 //IL_006e: Unknown result type (might be due to invalid IL or missing references)
54651 //IL_006f: Unknown result type (might be due to invalid IL or missing references)
54652 //IL_0074: Unknown result type (might be due to invalid IL or missing references)
54653 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
54654 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
54655 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
54656 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
54657 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
54658 //IL_0117: Unknown result type (might be due to invalid IL or missing references)
54659 //IL_0118: Unknown result type (might be due to invalid IL or missing references)
54660 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
54661 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
54662 //IL_012d: Unknown result type (might be due to invalid IL or missing references)
54663 //IL_0137: Unknown result type (might be due to invalid IL or missing references)
54664 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
54665 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
54666 //IL_0163: Unknown result type (might be due to invalid IL or missing references)
54667 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
54668 //IL_016d: Unknown result type (might be due to invalid IL or missing references)
54669 //IL_0174: Unknown result type (might be due to invalid IL or missing references)
54670 //IL_0179: Unknown result type (might be due to invalid IL or missing references)
54671 //IL_017b: Unknown result type (might be due to invalid IL or missing references)
54672 //IL_0180: Unknown result type (might be due to invalid IL or missing references)
54673 Player player = Main.player[owner];
54674 bool num5 = type == 755;
54675 bool flag = type == 946;
54676 idleRotation = 0f;
54677 idleSpot = Vector2.Zero;
54678 if (num5)
54679 {
54680 float num2 = ((float)totalIndexes - 1f) / 2f;
54681 idleSpot = player.Center + -Vector2.UnitY.RotatedBy(4.3982296f / (float)totalIndexes * ((float)stackedIndex - num2)) * 40f;
54682 idleRotation = 0f;
54683 }
54684 if (flag)
54685 {
54686 int num3 = stackedIndex + 1;
54687 idleRotation = (float)num3 * ((float)Math.PI * 2f) * (1f / 60f) * (float)player.direction + (float)Math.PI / 2f;
54689 int num4 = num3 % totalIndexes;
54690 Vector2 vector = Utils.RotatedBy(new Vector2(0f, 0.5f), (player.miscCounterNormalized * (2f + (float)num4) + (float)num4 * 0.5f + (float)player.direction * 1.3f) * ((float)Math.PI * 2f)) * 4f;
54691 idleSpot = idleRotation.ToRotationVector2() * 10f + player.MountedCenter + new Vector2((float)(player.direction * (num3 * -6 - 16)), player.gravDir * -15f);
54692 idleSpot += vector;
54693 idleRotation += (float)Math.PI / 2f;
54694 }
54695 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...

References Terraria.Entity.direction, Terraria.Player.gravDir, Terraria.Main.player, and Terraria.Utils.RotatedBy().

+ Here is the call graph for this function: