20612 {
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20679 Vector2
vector =
default(Vector2);
20681 {
20682 Projectile projectile = Main.projectile[
grappling[i]];
20683 if (projectile.ai[0] != 2
f || projectile.position.HasNaNs())
20684 {
20685 continue;
20686 }
20687 int type = projectile.type;
20689 if (projectile.ModProjectile != null)
20690 {
20691 num11 = ((projectile.ModProjectile.AIType > 0) ? 1 : 0);
20693 {
20694 projectile.type = projectile.ModProjectile.AIType;
20695 }
20696 }
20697 else
20698 {
20700 }
20701 num += projectile.position.X + (float)(projectile.width / 2);
20702 num3 += projectile.position.Y + (float)(projectile.height / 2);
20704 if (projectile.type == 446)
20705 {
20707 if (
vector != Vector2.Zero)
20708 {
20710 }
20712 Vector2
vec = Vector2.Normalize(
base.Center - projectile.Center +
vector);
20714 {
20715 vec = -Vector2.UnitY;
20716 }
20720 }
20721 else if (projectile.type == 652)
20722 {
20724 Vector2
vector3 = projectile.Center -
base.Center;
20726 Vector2 value = Vector2.Zero;
20728 {
20730 }
20733 {
20735 }
20736 num += 0
f - vector3.X + value.X *
num6;
20737 num3 += 0
f - vector3.Y + value.Y *
num6;
20738 }
20739 else if (projectile.type == 865)
20740 {
20741 Vector2
vector5 = (projectile.rotation - (float)
Math.PI / 2
f).ToRotationVector2().SafeNormalize(Vector2.UnitY);
20746 {
20748 }
20749 }
20751 {
20752 projectile.type = type;
20753 }
20755 }
20757 {
20760 return;
20761 }
20768 if (Main.projectile[
grappling[0]].type == 315)
20769 {
20771 }
20772 if (Main.projectile[
grappling[0]].type == 487)
20773 {
20775 }
20776 if (Main.projectile[
grappling[0]].type >= 646 && Main.projectile[
grappling[0]].type <= 649)
20777 {
20779 }
20785 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
static void GrappleTargetPoint(Projectile projectile, Player player, ref float grappleX, ref float grappleY)
static void GrapplePullSpeed(Projectile projectile, Player player, ref float speed)
This serves as the central class from which projectile-related functions are carried out....