51789 {
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51860 {
51861 if (player.dead)
51862 {
51863 player.babyBird = false;
51864 }
51865 if (player.babyBird)
51866 {
51868 }
51871 {
51875 {
51877 }
51878 }
51879 }
51887 {
51889 if (player.Distance(
nPC.Center) > (
float)
num5)
51890 {
51892 }
51893 }
51895 {
51897 {
51899 }
51902 Rectangle
rectangle =
default(Rectangle);
51904 Rectangle value = default(Rectangle);
51907 {
51910 {
51912 }
51914 {
51916 }
51917 }
51919 {
51922 }
51923 else
51924 {
51929 {
51931 }
51932 }
51933 float num8 = 0.025f;
51935 for (int i = 0; i < 1000; i++)
51936 {
51937 if (i !=
whoAmI && Main.projectile[i].active && Main.projectile[i].owner ==
owner && Main.projectile[i].type ==
type &&
Math.Abs(
position.X - Main.projectile[i].position.X) +
Math.Abs(
position.Y - Main.projectile[i].position.Y) <
num9)
51938 {
51939 if (
position.X < Main.projectile[i].position.X)
51940 {
51941 velocity.X -=
num8;
51942 }
51943 else
51944 {
51945 velocity.X +=
num8;
51946 }
51947 if (
position.Y < Main.projectile[i].position.Y)
51948 {
51949 velocity.Y -=
num8;
51950 }
51951 else
51952 {
51953 velocity.Y +=
num8;
51954 }
51955 }
51956 }
51960 return;
51961 }
51969 bool flag = player.gravDir > 0
f && player.fullRotation == 0
f && player.headRotation == 0
f;
51971 {
51978 }
51980 {
51986 {
51988 }
51989 float num2 = 0.05f;
51991 for (
int j = 0;
j < 1000;
j++)
51992 {
51994 {
51995 if (
position.X < Main.projectile[
j].position.X)
51996 {
51997 velocity.X -=
num2;
51998 }
51999 else
52000 {
52001 velocity.X +=
num2;
52002 }
52003 if (
position.Y < Main.projectile[
j].position.Y)
52004 {
52005 velocity.Y -=
num2;
52006 }
52007 else
52008 {
52009 velocity.Y +=
num2;
52010 }
52011 }
52012 }
52016 }
52017 else if (
num10 > 8
f + ((Vector2)(
ref player.velocity)).Length())
52018 {
52022 {
52024 }
52028 }
52030 {
52037 }
52038 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
float Distance(Vector2 Other)
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
Vector2 DirectionTo(Vector2 Destination)
int height
The height of this Entity's hitbox, in pixels.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
void Minion_FindTargetInRange(int startAttackRange, ref int attackTarget, bool skipIfCannotHitWithOwnBody, Func< Entity, int, bool > customEliminationCheck=null)
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
static Vector2 AI_158_GetHomeLocation(Player master, int stackedIndex)
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
void AI_GetMyGroupIndexAndFillBlackList(List< int > blackListedTargets, out int index, out int totalIndexesInGroup)
static List< int > _ai158_blacklistedTargets
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.