Definition at line 14283 of file Projectile.cs.
14284 {
14286 {
14287 return;
14288 }
14290 {
14293 if (Main.tile[num,
num2] ==
null)
14294 {
14295 return;
14296 }
14297 }
14300 {
14302 if (
type == 640 &&
ai[1] > 0f)
14303 {
14305 continue;
14306 }
14307 if (
position.
X <= Main.leftWorld ||
position.
X + (
float)
width >= Main.rightWorld || position.Y <= Main.topWorld || position.Y + (float)
height >= Main.bottomWorld)
14308 {
14310 return;
14311 }
14313 {
14315 }
14317 {
14320 }
14322 {
14325 {
14326 if ((
type == 627 ||
type == 626) &&
owner == Main.myPlayer)
14327 {
14330 {
14331 Projectile projectile = Main.projectile[
byUUID];
14332 if (projectile.type != 625)
14333 {
14334 projectile.localAI[1] =
localAI[1];
14335 }
14336 projectile = Main.projectile[(int)
localAI[1]];
14337 projectile.ai[0] =
ai[0];
14338 projectile.ai[1] = 1f;
14339 projectile.netUpdate = true;
14340 }
14341 }
14343 }
14344 else
14345 {
14346 Main.player[
owner].numMinions++;
14348 }
14349 }
14352 {
14355 {
14357 }
14358 }
14360 {
14363 {
14365 }
14366 }
14368 {
14370 }
14372 {
14374 }
14379 {
14381 }
14383 for (
int j = 0;
j < 255;
j++)
14384 {
14386 {
14388 }
14389 }
14391 {
14392 for (
int k = 0;
k < 200;
k++)
14393 {
14395 {
14397 }
14398 }
14399 }
14402 {
14403 velocity.X += Main.windSpeedCurrent * Main.windPhysicsStrength;
14405 }
14406 if (
owner < 255 && !Main.player[
owner].active)
14407 {
14409 }
14411 {
14413 }
14415 {
14416 bool flag;
14418 try
14419 {
14422 if (flag)
14423 {
14425 }
14426 if (Collision.honey)
14427 {
14429 }
14430 if (Collision.shimmer)
14431 {
14433 }
14434 }
14435 catch
14436 {
14438 return;
14439 }
14441 {
14443 {
14445 }
14447 {
14450 }
14451 }
14453 {
14455 {
14457 }
14459 {
14461 }
14462 }
14464 {
14467 if (flag &&
ai[0] >= 0f)
14468 {
14470 }
14471 }
14473 {
14475 {
14476 if (!flag)
14477 {
14479 {
14480 for (
int l = 0;
l < 10;
l++)
14481 {
14483 Main.dust[
num4].velocity.Y -= 4f;
14484 Main.dust[
num4].velocity.X *= 2.5f;
14485 Main.dust[
num4].scale = 1.3f;
14486 Main.dust[
num4].noGravity =
true;
14487 switch (Main.rand.Next(6))
14488 {
14489 case 0:
14490 Main.dust[
num4].color =
new Color(255, 255, 210);
14491 break;
14492 case 1:
14493 Main.dust[
num4].color =
new Color(190, 245, 255);
14494 break;
14495 case 2:
14496 Main.dust[
num4].color =
new Color(255, 150, 255);
14497 break;
14498 default:
14499 Main.dust[
num4].color =
new Color(190, 175, 255);
14500 break;
14501 }
14503 }
14504 }
14506 {
14507 for (
int m = 0;
m < 10;
m++)
14508 {
14510 Main.dust[
num5].velocity.Y -= 1f;
14511 Main.dust[
num5].velocity.X *= 2.5f;
14512 Main.dust[
num5].scale = 1.3f;
14513 Main.dust[
num5].alpha = 100;
14514 Main.dust[
num5].noGravity =
true;
14515 }
14517 }
14518 else
14519 {
14520 for (
int n = 0;
n < 10;
n++)
14521 {
14523 Main.dust[
num6].velocity.Y -= 4f;
14524 Main.dust[
num6].velocity.X *= 2.5f;
14525 Main.dust[
num6].scale = 1.3f;
14526 Main.dust[
num6].alpha = 100;
14527 Main.dust[
num6].noGravity =
true;
14528 }
14530 }
14531 }
14532 else
14533 {
14535 {
14537 Main.dust[
num8].velocity.Y -= 1.5f;
14538 Main.dust[
num8].velocity.X *= 2.5f;
14539 Main.dust[
num8].scale = 1.3f;
14540 Main.dust[
num8].alpha = 100;
14541 Main.dust[
num8].noGravity =
true;
14542 }
14544 }
14545 }
14547 }
14549 {
14552 {
14553 velocity.Y *= 0.5f;
14554 }
14556 {
14559 {
14561 {
14563 {
14565 Main.dust[
num10].velocity.Y -= 4f;
14566 Main.dust[
num10].velocity.X *= 2.5f;
14567 Main.dust[
num10].scale = 1.3f;
14568 Main.dust[
num10].noGravity =
true;
14569 switch (Main.rand.Next(6))
14570 {
14571 case 0:
14572 Main.dust[
num10].color =
new Color(255, 255, 210);
14573 break;
14574 case 1:
14575 Main.dust[
num10].color =
new Color(190, 245, 255);
14576 break;
14577 case 2:
14578 Main.dust[
num10].color =
new Color(255, 150, 255);
14579 break;
14580 default:
14581 Main.dust[
num10].color =
new Color(190, 175, 255);
14582 break;
14583 }
14585 }
14586 }
14588 {
14590 {
14592 Main.dust[
num12].velocity.Y -= 1f;
14593 Main.dust[
num12].velocity.X *= 2.5f;
14594 Main.dust[
num12].scale = 1.3f;
14595 Main.dust[
num12].alpha = 100;
14596 Main.dust[
num12].noGravity =
true;
14597 }
14599 }
14600 else
14601 {
14603 {
14605 Main.dust[
num14].velocity.Y -= 4f;
14606 Main.dust[
num14].velocity.X *= 2.5f;
14607 Main.dust[
num14].scale = 1.3f;
14608 Main.dust[
num14].alpha = 100;
14609 Main.dust[
num14].noGravity =
true;
14610 }
14612 }
14613 }
14614 else
14615 {
14617 {
14619 Main.dust[
num16].velocity.Y -= 1.5f;
14620 Main.dust[
num16].velocity.X *= 2.5f;
14621 Main.dust[
num16].scale = 1.3f;
14622 Main.dust[
num16].alpha = 100;
14623 Main.dust[
num16].noGravity =
true;
14624 }
14626 }
14627 }
14628 }
14630 {
14634 }
14636 {
14638 }
14639 }
14641 {
14643 }
14648 {
14650 {
14652 }
14653 else
14654 {
14656 }
14657 }
14659 {
14660 return;
14661 }
14664 {
14666 }
14668 {
14670 }
14671 else if (
type == 172)
14672 {
14674 }
14675 else if (
type == 103)
14676 {
14678 if (Main.rand.Next(2) == 0)
14679 {
14680 Main.dust[
num17].noGravity =
true;
14681 Main.dust[
num17].scale *= 2f;
14682 }
14683 }
14684 else if (
type == 278)
14685 {
14687 if (Main.rand.Next(2) == 0)
14688 {
14689 Main.dust[
num18].noGravity =
true;
14690 Main.dust[
num18].scale *= 1.5f;
14691 }
14692 }
14693 else if (
type == 4)
14694 {
14695 if (Main.rand.Next(5) == 0)
14696 {
14698 }
14699 }
14700 else if (
type == 5)
14701 {
14702 int num19 = Main.rand.Next(3);
14704 {
14705 0 => 15,
14706 1 => 57,
14708 }, velocity.X * 0.5f, velocity.Y * 0.5f, 150,
default(
Color), 1.2f);
14709 }
14712 {
14718 }
14719 if (Main.netMode != 1 && (
type == 99 ||
type == 1013 ||
type == 655 ||
type == 727 ||
type == 1014 ||
type == 1021))
14720 {
14722 }
14724 {
14726 {
14728 }
14730 }
14732 {
14734 {
14736 {
14738 }
14741 {
14742 float num22 =
rotation + (float)
Math.
PI / 2f + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
14743 float num23 = (float)Main.rand.NextDouble() * 2f + 2f;
14746 Main.dust[
num24].noGravity =
true;
14747 Main.dust[
num24].scale = 1.7f;
14748 }
14750 {
14752 float num26 = (float)Main.rand.NextDouble() * 2f + 2f;
14755 Main.dust[
num27].noGravity =
true;
14756 Main.dust[
num27].scale = 1.7f;
14757 }
14758 }
14759 }
14761 {
14763 {
14767 }
14771 }
14773 {
14775 {
14779 }
14786 {
14788 {
14790 {
14792 {
14794 }
14796 }
14797 }
14798 }
14799 }
14801 {
14804 {
14809 {
14811 }
14812 }
14816 }
14818 {
14820 {
14824 }
14828 }
14830 {
14832 }
14835 {
14837 }
14839 {
14841 }
14843 {
14844 continue;
14845 }
14847 {
14849 }
14851 {
14853 }
14855 {
14857 {
14859 NetMessage.SendData(27, -1, -1, null, i);
14861 }
14862 else
14863 {
14865 }
14866 }
14868 {
14870 }
14871 }
14873 }
static float Clamp(float value, float min, float max)
static double Cos(double d)
static double Abs(double value)
static double Sin(double a)
static void PlaySound(int type, Vector2 position, int style=1)
float Distance(Vector2 Other)
static int[] TrailingMode
static bool[] IsAGolfBall
static bool[] IsADD2Turret
void HandleMovement(Vector2 wetVelocity, out int overrideWidth, out int overrideHeight)
bool ShouldUseWindPhysics()
bool AutomaticallyChangesDirection()
bool usesLocalNPCImmunity
static int GetByUUID(int owner, float uuid)
void UpdateEnchantmentVisuals()
bool noEnchantmentVisuals
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
References System.Math.Abs(), Terraria.Entity.active, Terraria.Projectile.ai, Terraria.Projectile.AI(), Terraria.Projectile.arrow, Terraria.Projectile.AutomaticallyChangesDirection(), Terraria.Main.bottomWorld, Microsoft.Xna.Framework.MathHelper.Clamp(), System.Math.Cos(), Terraria.Projectile.damage, Terraria.Projectile.Damage(), Terraria.Entity.direction, Terraria.Entity.Distance(), Terraria.Main.dust, Terraria.Dust.dustWater(), System.E, Terraria.Projectile.extraUpdates, Terraria.Projectile.frameCounter, Terraria.Projectile.friendly, Terraria.Projectile.GetByUUID(), Terraria.Projectile.gfxOffY, Terraria.Projectile.HandleMovement(), Terraria.Entity.height, Terraria.Collision.honey, Terraria.Entity.honeyWet, Terraria.Projectile.ignoreWater, Terraria.ID.ProjectileID.Sets.IsADD2Turret, Terraria.ID.ProjectileID.Sets.IsAGolfBall, Terraria.Projectile.Kill(), Terraria.Collision.LavaCollision(), Terraria.Entity.lavaWet, Terraria.Main.leftWorld, Microsoft.Xna.Framework.Vector2.Length(), Microsoft.Xna.Framework.Vector2.Lerp(), Terraria.Projectile.light, Terraria.Projectile.localAI, Terraria.Projectile.localNPCImmunity, Terraria.Projectile.minion, Terraria.Projectile.minionPos, Terraria.Projectile.minionSlots, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.netSpam, Terraria.Projectile.netUpdate, Terraria.Projectile.netUpdate2, Terraria.Dust.NewDust(), Terraria.Projectile.noEnchantmentVisuals, Terraria.Projectile.npcProj, Terraria.Projectile.numUpdates, Terraria.Entity.oldDirection, Terraria.Projectile.oldPos, Terraria.Entity.oldPosition, Terraria.Projectile.oldRot, Terraria.Projectile.oldSpriteDirection, Terraria.Entity.oldVelocity, Terraria.GameContent.Events.DD2Event.Ongoing, Terraria.Projectile.originalDamage, Terraria.Projectile.owner, Terraria.Projectile.penetrate, System.Math.PI, Terraria.Main.player, Terraria.Projectile.playerImmune, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Entity.position, Terraria.Main.projectile, Terraria.Projectile.ProjLight(), Terraria.Main.rand, Terraria.Projectile.rotation, Terraria.NetMessage.SendData(), Terraria.Projectile.sentry, Terraria.Collision.shimmer, Terraria.Projectile.Shimmer(), Terraria.Entity.shimmerWet, Terraria.Projectile.ShouldUseWindPhysics(), System.Math.Sin(), Terraria.Projectile.soundDelay, Terraria.Projectile.spriteDirection, Terraria.Projectile.stepSpeed, Terraria.Collision.SwitchTiles(), Terraria.Main.tile, Terraria.Projectile.timeLeft, Terraria.ID.ProjectileID.Sets.TrailingMode, Terraria.Projectile.type, Terraria.Projectile.UpdateEnchantmentVisuals(), Terraria.Projectile.usesLocalNPCImmunity, Terraria.Entity.velocity, Terraria.Entity.wet, Terraria.Collision.WetCollision(), Terraria.Entity.wetCount, Terraria.Entity.whoAmI, Terraria.Entity.width, Terraria.Main.windPhysicsStrength, Terraria.Main.windSpeedCurrent, Terraria.Main.worldSurface, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Vector2.Y, and Microsoft.Xna.Framework.Vector2.Zero.