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

◆ AI_099_1()

void Terraria.Projectile.AI_099_1 ( )
inlineprivate

Definition at line 73961 of file Projectile.cs.

73962 {
73963 //IL_0220: Unknown result type (might be due to invalid IL or missing references)
73964 //IL_0226: Unknown result type (might be due to invalid IL or missing references)
73965 //IL_022b: Unknown result type (might be due to invalid IL or missing references)
73966 //IL_0230: Unknown result type (might be due to invalid IL or missing references)
73967 //IL_0ba5: Unknown result type (might be due to invalid IL or missing references)
73968 //IL_0bab: Unknown result type (might be due to invalid IL or missing references)
73969 //IL_0bb0: Unknown result type (might be due to invalid IL or missing references)
73970 //IL_0bb5: Unknown result type (might be due to invalid IL or missing references)
73971 //IL_0bc9: Unknown result type (might be due to invalid IL or missing references)
73972 //IL_0265: Unknown result type (might be due to invalid IL or missing references)
73973 //IL_026d: Unknown result type (might be due to invalid IL or missing references)
73974 //IL_027b: Unknown result type (might be due to invalid IL or missing references)
73975 //IL_028e: Unknown result type (might be due to invalid IL or missing references)
73976 //IL_0291: Unknown result type (might be due to invalid IL or missing references)
73977 //IL_0296: Unknown result type (might be due to invalid IL or missing references)
73978 //IL_02a5: Unknown result type (might be due to invalid IL or missing references)
73979 //IL_02aa: Unknown result type (might be due to invalid IL or missing references)
73980 //IL_02ac: Unknown result type (might be due to invalid IL or missing references)
73981 //IL_02b1: Unknown result type (might be due to invalid IL or missing references)
73982 //IL_0316: Unknown result type (might be due to invalid IL or missing references)
73983 //IL_0320: Unknown result type (might be due to invalid IL or missing references)
73984 //IL_0325: Unknown result type (might be due to invalid IL or missing references)
73985 //IL_033a: Unknown result type (might be due to invalid IL or missing references)
73986 //IL_0345: Unknown result type (might be due to invalid IL or missing references)
73987 //IL_0362: Unknown result type (might be due to invalid IL or missing references)
73988 //IL_0378: Unknown result type (might be due to invalid IL or missing references)
73989 //IL_0387: Unknown result type (might be due to invalid IL or missing references)
73990 //IL_038e: Unknown result type (might be due to invalid IL or missing references)
73991 //IL_080d: Unknown result type (might be due to invalid IL or missing references)
73992 //IL_03ac: Unknown result type (might be due to invalid IL or missing references)
73993 //IL_03b3: Unknown result type (might be due to invalid IL or missing references)
73994 //IL_0399: Unknown result type (might be due to invalid IL or missing references)
73995 //IL_03d5: Unknown result type (might be due to invalid IL or missing references)
73996 //IL_03dc: Unknown result type (might be due to invalid IL or missing references)
73997 //IL_03c3: Unknown result type (might be due to invalid IL or missing references)
73998 //IL_061a: Unknown result type (might be due to invalid IL or missing references)
73999 //IL_0621: Unknown result type (might be due to invalid IL or missing references)
74000 //IL_0626: Unknown result type (might be due to invalid IL or missing references)
74001 //IL_03fa: Unknown result type (might be due to invalid IL or missing references)
74002 //IL_0401: Unknown result type (might be due to invalid IL or missing references)
74003 //IL_03e7: Unknown result type (might be due to invalid IL or missing references)
74004 //IL_0725: Unknown result type (might be due to invalid IL or missing references)
74005 //IL_072a: Unknown result type (might be due to invalid IL or missing references)
74006 //IL_072d: Unknown result type (might be due to invalid IL or missing references)
74007 //IL_0732: Unknown result type (might be due to invalid IL or missing references)
74008 //IL_0737: Unknown result type (might be due to invalid IL or missing references)
74009 //IL_0630: Unknown result type (might be due to invalid IL or missing references)
74010 //IL_0646: Unknown result type (might be due to invalid IL or missing references)
74011 //IL_042a: Unknown result type (might be due to invalid IL or missing references)
74012 //IL_0437: Unknown result type (might be due to invalid IL or missing references)
74013 //IL_043c: Unknown result type (might be due to invalid IL or missing references)
74014 //IL_043e: Unknown result type (might be due to invalid IL or missing references)
74015 //IL_0445: Unknown result type (might be due to invalid IL or missing references)
74016 //IL_044c: Unknown result type (might be due to invalid IL or missing references)
74017 //IL_0411: Unknown result type (might be due to invalid IL or missing references)
74018 //IL_0c55: Unknown result type (might be due to invalid IL or missing references)
74019 //IL_0c59: Unknown result type (might be due to invalid IL or missing references)
74020 //IL_0c5e: Unknown result type (might be due to invalid IL or missing references)
74021 //IL_0c62: Unknown result type (might be due to invalid IL or missing references)
74022 //IL_0c6f: Unknown result type (might be due to invalid IL or missing references)
74023 //IL_0c74: Unknown result type (might be due to invalid IL or missing references)
74024 //IL_0c76: Unknown result type (might be due to invalid IL or missing references)
74025 //IL_0c7d: Unknown result type (might be due to invalid IL or missing references)
74026 //IL_0c82: Unknown result type (might be due to invalid IL or missing references)
74027 //IL_066d: Unknown result type (might be due to invalid IL or missing references)
74028 //IL_0683: Unknown result type (might be due to invalid IL or missing references)
74029 //IL_0652: Unknown result type (might be due to invalid IL or missing references)
74030 //IL_0516: Unknown result type (might be due to invalid IL or missing references)
74031 //IL_051b: Unknown result type (might be due to invalid IL or missing references)
74032 //IL_0526: Unknown result type (might be due to invalid IL or missing references)
74033 //IL_0536: Unknown result type (might be due to invalid IL or missing references)
74034 //IL_0543: Unknown result type (might be due to invalid IL or missing references)
74035 //IL_0548: Unknown result type (might be due to invalid IL or missing references)
74036 //IL_054a: Unknown result type (might be due to invalid IL or missing references)
74037 //IL_0478: Unknown result type (might be due to invalid IL or missing references)
74038 //IL_047d: Unknown result type (might be due to invalid IL or missing references)
74039 //IL_0488: Unknown result type (might be due to invalid IL or missing references)
74040 //IL_0498: Unknown result type (might be due to invalid IL or missing references)
74041 //IL_04a5: Unknown result type (might be due to invalid IL or missing references)
74042 //IL_04aa: Unknown result type (might be due to invalid IL or missing references)
74043 //IL_04ac: Unknown result type (might be due to invalid IL or missing references)
74044 //IL_06aa: Unknown result type (might be due to invalid IL or missing references)
74045 //IL_06c0: Unknown result type (might be due to invalid IL or missing references)
74046 //IL_068f: Unknown result type (might be due to invalid IL or missing references)
74047 //IL_057b: Unknown result type (might be due to invalid IL or missing references)
74048 //IL_057d: Unknown result type (might be due to invalid IL or missing references)
74049 //IL_0562: Unknown result type (might be due to invalid IL or missing references)
74050 //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
74051 //IL_04df: Unknown result type (might be due to invalid IL or missing references)
74052 //IL_04c4: Unknown result type (might be due to invalid IL or missing references)
74053 //IL_06e7: Unknown result type (might be due to invalid IL or missing references)
74054 //IL_06fd: Unknown result type (might be due to invalid IL or missing references)
74055 //IL_06cc: Unknown result type (might be due to invalid IL or missing references)
74056 //IL_0585: Unknown result type (might be due to invalid IL or missing references)
74057 //IL_0588: Unknown result type (might be due to invalid IL or missing references)
74058 //IL_0592: Unknown result type (might be due to invalid IL or missing references)
74059 //IL_0597: Unknown result type (might be due to invalid IL or missing references)
74060 //IL_05a1: Unknown result type (might be due to invalid IL or missing references)
74061 //IL_05a6: Unknown result type (might be due to invalid IL or missing references)
74062 //IL_04ea: Unknown result type (might be due to invalid IL or missing references)
74063 //IL_04ed: Unknown result type (might be due to invalid IL or missing references)
74064 //IL_04f7: Unknown result type (might be due to invalid IL or missing references)
74065 //IL_04fc: Unknown result type (might be due to invalid IL or missing references)
74066 //IL_0506: Unknown result type (might be due to invalid IL or missing references)
74067 //IL_050b: Unknown result type (might be due to invalid IL or missing references)
74068 //IL_09d8: Unknown result type (might be due to invalid IL or missing references)
74069 //IL_09db: Unknown result type (might be due to invalid IL or missing references)
74070 //IL_09e0: Unknown result type (might be due to invalid IL or missing references)
74071 //IL_09e5: Unknown result type (might be due to invalid IL or missing references)
74072 //IL_0709: Unknown result type (might be due to invalid IL or missing references)
74073 //IL_0b54: Unknown result type (might be due to invalid IL or missing references)
74074 //IL_0b5a: Unknown result type (might be due to invalid IL or missing references)
74075 //IL_0b5f: Unknown result type (might be due to invalid IL or missing references)
74076 //IL_09fb: Unknown result type (might be due to invalid IL or missing references)
74077 //IL_0a02: Unknown result type (might be due to invalid IL or missing references)
74078 //IL_0a07: Unknown result type (might be due to invalid IL or missing references)
74079 //IL_0a0b: Unknown result type (might be due to invalid IL or missing references)
74080 //IL_0a15: Unknown result type (might be due to invalid IL or missing references)
74081 //IL_0a1a: Unknown result type (might be due to invalid IL or missing references)
74082 //IL_0a1c: Unknown result type (might be due to invalid IL or missing references)
74083 //IL_0a26: Unknown result type (might be due to invalid IL or missing references)
74084 //IL_0a2b: Unknown result type (might be due to invalid IL or missing references)
74085 //IL_092c: Unknown result type (might be due to invalid IL or missing references)
74086 //IL_0945: Unknown result type (might be due to invalid IL or missing references)
74087 //IL_0b80: Unknown result type (might be due to invalid IL or missing references)
74088 //IL_0b87: Unknown result type (might be due to invalid IL or missing references)
74089 //IL_0b8c: Unknown result type (might be due to invalid IL or missing references)
74090 //IL_0a42: Unknown result type (might be due to invalid IL or missing references)
74091 //IL_0a49: Unknown result type (might be due to invalid IL or missing references)
74092 //IL_0a4e: Unknown result type (might be due to invalid IL or missing references)
74093 //IL_0a52: Unknown result type (might be due to invalid IL or missing references)
74094 //IL_0a5c: Unknown result type (might be due to invalid IL or missing references)
74095 //IL_0a61: Unknown result type (might be due to invalid IL or missing references)
74096 //IL_0a63: Unknown result type (might be due to invalid IL or missing references)
74097 //IL_0a6d: Unknown result type (might be due to invalid IL or missing references)
74098 //IL_0a72: Unknown result type (might be due to invalid IL or missing references)
74099 //IL_0973: Unknown result type (might be due to invalid IL or missing references)
74100 //IL_0984: Unknown result type (might be due to invalid IL or missing references)
74101 //IL_0989: Unknown result type (might be due to invalid IL or missing references)
74102 //IL_098e: Unknown result type (might be due to invalid IL or missing references)
74103 //IL_0a89: Unknown result type (might be due to invalid IL or missing references)
74104 //IL_0a90: Unknown result type (might be due to invalid IL or missing references)
74105 //IL_0a95: Unknown result type (might be due to invalid IL or missing references)
74106 //IL_0a99: Unknown result type (might be due to invalid IL or missing references)
74107 //IL_0aa3: Unknown result type (might be due to invalid IL or missing references)
74108 //IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
74109 //IL_0aaa: Unknown result type (might be due to invalid IL or missing references)
74110 //IL_0ab4: Unknown result type (might be due to invalid IL or missing references)
74111 //IL_0ab9: Unknown result type (might be due to invalid IL or missing references)
74112 //IL_0b04: Unknown result type (might be due to invalid IL or missing references)
74113 //IL_0b0b: Unknown result type (might be due to invalid IL or missing references)
74114 //IL_0b10: Unknown result type (might be due to invalid IL or missing references)
74115 //IL_0b14: Unknown result type (might be due to invalid IL or missing references)
74116 //IL_0b1e: Unknown result type (might be due to invalid IL or missing references)
74117 //IL_0b23: Unknown result type (might be due to invalid IL or missing references)
74118 //IL_0b25: Unknown result type (might be due to invalid IL or missing references)
74119 //IL_0b2f: Unknown result type (might be due to invalid IL or missing references)
74120 //IL_0b34: Unknown result type (might be due to invalid IL or missing references)
74121 //IL_0acd: Unknown result type (might be due to invalid IL or missing references)
74122 //IL_0ad4: Unknown result type (might be due to invalid IL or missing references)
74123 //IL_0ad9: Unknown result type (might be due to invalid IL or missing references)
74124 //IL_0add: Unknown result type (might be due to invalid IL or missing references)
74125 //IL_0ae7: Unknown result type (might be due to invalid IL or missing references)
74126 //IL_0aec: Unknown result type (might be due to invalid IL or missing references)
74127 //IL_0aee: Unknown result type (might be due to invalid IL or missing references)
74128 //IL_0af8: Unknown result type (might be due to invalid IL or missing references)
74129 //IL_0afd: Unknown result type (might be due to invalid IL or missing references)
74130 timeLeft = 6;
74131 bool flag = true;
74132 float num = 250f;
74133 float num6 = 0.1f;
74134 float num7 = 15f;
74135 float num8 = 12f;
74136 num *= 0.5f;
74137 num7 *= 0.8f;
74138 num8 *= 1.5f;
74139 if (owner == Main.myPlayer)
74140 {
74141 bool flag2 = false;
74142 for (int i = 0; i < 1000; i++)
74143 {
74144 if (Main.projectile[i].active && Main.projectile[i].owner == owner && Main.projectile[i].aiStyle == 99 && (Main.projectile[i].type < 556 || Main.projectile[i].type > 561))
74145 {
74146 flag2 = true;
74147 }
74148 }
74149 if (!flag2)
74150 {
74151 ai[0] = -1f;
74152 netUpdate = true;
74153 }
74154 }
74155 if (Main.player[owner].yoyoString)
74156 {
74157 num += num * 0.25f + 10f;
74158 }
74159 rotation += 0.5f;
74160 if (Main.player[owner].dead)
74161 {
74162 Kill();
74163 return;
74164 }
74165 if (!flag)
74166 {
74167 Main.player[owner].heldProj = whoAmI;
74168 Main.player[owner].SetDummyItemTime(2);
74169 if (position.X + (float)(width / 2) > Main.player[owner].position.X + (float)(Main.player[owner].width / 2))
74170 {
74171 Main.player[owner].ChangeDir(1);
74172 direction = 1;
74173 }
74174 else
74175 {
74176 Main.player[owner].ChangeDir(-1);
74177 direction = -1;
74178 }
74179 }
74180 if (ai[0] == 0f || ai[0] == 1f)
74181 {
74182 if (ai[0] == 1f)
74183 {
74184 num *= 0.75f;
74185 }
74186 num8 *= 0.5f;
74187 bool flag3 = false;
74188 Vector2 vector = Main.player[owner].Center - base.Center;
74189 if ((double)((Vector2)(ref vector)).Length() > (double)num * 0.9)
74190 {
74191 flag3 = true;
74192 }
74193 if (((Vector2)(ref vector)).Length() > num)
74194 {
74195 float num9 = ((Vector2)(ref vector)).Length() - num;
74196 Vector2 vector2 = default(Vector2);
74197 vector2.X = vector.Y;
74198 vector2.Y = vector.X;
74199 ((Vector2)(ref vector)).Normalize();
74200 vector *= num;
74201 position = Main.player[owner].Center - vector;
74202 position.X -= width / 2;
74203 position.Y -= height / 2;
74204 float num10 = ((Vector2)(ref velocity)).Length();
74205 ((Vector2)(ref velocity)).Normalize();
74206 if (num9 > num10 - 1f)
74207 {
74208 num9 = num10 - 1f;
74209 }
74210 velocity *= num10 - num9;
74211 num10 = ((Vector2)(ref velocity)).Length();
74212 Vector2 vector3 = default(Vector2);
74213 ((Vector2)(ref vector3))._002Ector(base.Center.X, base.Center.Y);
74214 Vector2 vector4 = default(Vector2);
74215 ((Vector2)(ref vector4))._002Ector(Main.player[owner].Center.X, Main.player[owner].Center.Y);
74216 if (vector3.Y < vector4.Y)
74217 {
74218 vector2.Y = Math.Abs(vector2.Y);
74219 }
74220 else if (vector3.Y > vector4.Y)
74221 {
74222 vector2.Y = 0f - Math.Abs(vector2.Y);
74223 }
74224 if (vector3.X < vector4.X)
74225 {
74226 vector2.X = Math.Abs(vector2.X);
74227 }
74228 else if (vector3.X > vector4.X)
74229 {
74230 vector2.X = 0f - Math.Abs(vector2.X);
74231 }
74232 ((Vector2)(ref vector2)).Normalize();
74233 vector2 *= ((Vector2)(ref velocity)).Length();
74234 new Vector2(vector2.X, vector2.Y);
74235 if (Math.Abs(velocity.X) > Math.Abs(velocity.Y))
74236 {
74237 Vector2 vector5 = velocity;
74238 vector5.Y += vector2.Y;
74239 ((Vector2)(ref vector5)).Normalize();
74240 vector5 *= ((Vector2)(ref velocity)).Length();
74241 if ((double)Math.Abs(vector2.X) < 0.1 || (double)Math.Abs(vector2.Y) < 0.1)
74242 {
74243 velocity = vector5;
74244 }
74245 else
74246 {
74247 velocity = (vector5 + velocity * 2f) / 3f;
74248 }
74249 }
74250 else
74251 {
74252 Vector2 vector6 = velocity;
74253 vector6.X += vector2.X;
74254 ((Vector2)(ref vector6)).Normalize();
74255 vector6 *= ((Vector2)(ref velocity)).Length();
74256 if ((double)Math.Abs(vector2.X) < 0.2 || (double)Math.Abs(vector2.Y) < 0.2)
74257 {
74258 velocity = vector6;
74259 }
74260 else
74261 {
74262 velocity = (vector6 + velocity * 2f) / 3f;
74263 }
74264 }
74265 }
74266 if (Main.myPlayer == owner)
74267 {
74268 if (Main.player[owner].channel)
74269 {
74270 Vector2 vector7 = default(Vector2);
74271 ((Vector2)(ref vector7))._002Ector((float)(Main.mouseX - Main.lastMouseX), (float)(Main.mouseY - Main.lastMouseY));
74272 if (velocity.X != 0f || velocity.Y != 0f)
74273 {
74274 if (flag)
74275 {
74276 vector7 *= -1f;
74277 }
74278 if (flag3)
74279 {
74280 if (base.Center.X < Main.player[owner].Center.X && vector7.X < 0f)
74281 {
74282 vector7.X = 0f;
74283 }
74284 if (base.Center.X > Main.player[owner].Center.X && vector7.X > 0f)
74285 {
74286 vector7.X = 0f;
74287 }
74288 if (base.Center.Y < Main.player[owner].Center.Y && vector7.Y < 0f)
74289 {
74290 vector7.Y = 0f;
74291 }
74292 if (base.Center.Y > Main.player[owner].Center.Y && vector7.Y > 0f)
74293 {
74294 vector7.Y = 0f;
74295 }
74296 }
74297 velocity += vector7 * num6;
74298 netUpdate = true;
74299 }
74300 }
74301 else
74302 {
74303 ai[0] = -1f;
74304 netUpdate = true;
74305 }
74306 }
74307 if (flag || type == 562 || type == 547 || type == 555 || type == 564 || type == 552 || type == 563 || type == 549 || type == 550 || type == 554 || type == 553 || type == 603 || type == 999)
74308 {
74309 float num11 = 800f;
74310 Vector2 vector8 = default(Vector2);
74311 bool flag4 = false;
74312 if (type == 549)
74313 {
74314 num11 = 200f;
74315 }
74316 if (type == 554)
74317 {
74318 num11 = 400f;
74319 }
74320 if (type == 553)
74321 {
74322 num11 = 250f;
74323 }
74324 if (type == 603)
74325 {
74326 num11 = 320f;
74327 }
74328 for (int j = 0; j < 200; j++)
74329 {
74330 if (!Main.npc[j].CanBeChasedBy(this))
74331 {
74332 continue;
74333 }
74334 float num12 = Main.npc[j].position.X + (float)(Main.npc[j].width / 2);
74335 float num13 = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2);
74336 float num2 = Math.Abs(position.X + (float)(width / 2) - num12) + Math.Abs(position.Y + (float)(height / 2) - num13);
74337 if (num2 < num11 && (type != 563 || !(num2 < 200f)) && Collision.CanHit(position, width, height, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height))
74338 {
74339 Vector2 val = Main.npc[j].Center - Main.player[owner].Center;
74340 if ((double)((Vector2)(ref val)).Length() < (double)num * 0.9)
74341 {
74342 num11 = num2;
74343 vector8.X = num12;
74344 vector8.Y = num13;
74345 flag4 = true;
74346 }
74347 }
74348 }
74349 if (flag4)
74350 {
74351 vector8 -= base.Center;
74352 ((Vector2)(ref vector8)).Normalize();
74353 if (type == 563)
74354 {
74355 vector8 *= 4f;
74356 velocity = (velocity * 14f + vector8) / 15f;
74357 }
74358 else if (type == 553)
74359 {
74360 vector8 *= 5f;
74361 velocity = (velocity * 12f + vector8) / 13f;
74362 }
74363 else if (type == 603)
74364 {
74365 vector8 *= 16f;
74366 velocity = (velocity * 9f + vector8) / 10f;
74367 }
74368 else if (type == 554)
74369 {
74370 vector8 *= 8f;
74371 velocity = (velocity * 6f + vector8) / 7f;
74372 }
74373 else
74374 {
74375 vector8 *= 6f;
74376 velocity = (velocity * 7f + vector8) / 8f;
74377 }
74378 }
74379 }
74380 if (((Vector2)(ref velocity)).Length() > num7)
74381 {
74382 ((Vector2)(ref velocity)).Normalize();
74383 velocity *= num7;
74384 }
74385 if (((Vector2)(ref velocity)).Length() < num8)
74386 {
74387 ((Vector2)(ref velocity)).Normalize();
74388 velocity *= num8;
74389 }
74390 return;
74391 }
74392 tileCollide = false;
74393 Vector2 vector9 = Main.player[owner].Center - base.Center;
74394 float num3 = ((Vector2)(ref vector9)).Length();
74395 if (num3 < 40f || vector9.HasNaNs() || num3 > 2000f)
74396 {
74397 Kill();
74398 return;
74399 }
74400 float num4 = num7 * 1.5f;
74401 if (type == 546)
74402 {
74403 num4 *= 1.5f;
74404 }
74405 if (type == 554)
74406 {
74407 num4 *= 1.25f;
74408 }
74409 if (type == 555)
74410 {
74411 num4 *= 1.35f;
74412 }
74413 if (type == 562)
74414 {
74415 num4 *= 1.25f;
74416 }
74417 float num5 = 12f;
74418 ((Vector2)(ref vector9)).Normalize();
74419 vector9 *= num4;
74420 velocity = (velocity * (num5 - 1f) + vector9) / num5;
74421 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
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...

References Terraria.Collision.CanHit(), Terraria.Main.lastMouseX, Terraria.Main.lastMouseY, Terraria.Main.myPlayer, Terraria.Main.npc, Terraria.Main.player, and Terraria.Main.projectile.

+ Here is the call graph for this function: