Definition at line 42689 of file Projectile.cs.
42690 {
42691 if (Main.player[
owner].dead || Main.player[
owner].stoned || Main.player[
owner].webbed || Main.player[
owner].frozen)
42692 {
42694 return;
42695 }
42698 float num = mountedCenter.X -
vector.X;
42702 if (
ai[0] == 2f &&
type == 865)
42703 {
42707 }
42708 if (Main.myPlayer ==
owner)
42709 {
42710 int num6 = (int)(
base.Center.X / 16f);
42711 int num7 = (int)(
base.Center.Y / 16f);
42713 {
42715 if (Main.netMode != 0)
42716 {
42717 NetMessage.SendData(17, -1, -1,
null, 20,
num6,
num7);
42718 }
42719 }
42720 }
42722 {
42724 }
42726 {
42728 }
42730 {
42734 {
42736 }
42737 DelegateMethods.v3_1 =
new Vector3(0f, 0.4f, 0.3f);
42738 Utils.PlotTileLine(
base.Center,
mountedCenter, 8f, DelegateMethods.CastLightOpen);
42739 }
42741 {
42744 {
42746 }
42747 }
42749 {
42752 {
42753 case 646:
42755 break;
42756 case 647:
42758 break;
42759 case 648:
42761 break;
42762 case 649:
42764 break;
42765 }
42768 DelegateMethods.v3_1 =
vector2;
42769 Utils.PlotTileLine(
base.Center,
mountedCenter, 8f, DelegateMethods.CastLightOpen);
42770 }
42772 {
42774 {
42776 }
42777 else if (
type >= 230 &&
type <= 235)
42778 {
42779 int num8 = 300 + (
type - 230) * 30;
42781 {
42783 }
42784 }
42785 else if (
type == 753)
42786 {
42789 {
42791 }
42792 }
42802 {
42804 }
42805 if (
num11 > Main.maxTilesX)
42806 {
42807 num11 = Main.maxTilesX;
42808 }
42810 {
42812 }
42813 if (
num13 > Main.maxTilesY)
42814 {
42815 num13 = Main.maxTilesY;
42816 }
42819 for (
int i = 0;
i < player.grapCount;
i++)
42820 {
42821 Projectile projectile = Main.projectile[player.grappling[
i]];
42822 if (projectile.aiStyle != 7 || projectile.ai[0] != 2f)
42823 {
42824 continue;
42825 }
42826 Point pt = projectile.Center.ToTileCoordinates();
42829 {
42830 continue;
42831 }
42832 for (
int j = -2;
j <= 2;
j++)
42833 {
42834 for (
int k = -2;
k <= 2;
k++)
42835 {
42839 {
42841 }
42842 }
42843 }
42844 }
42847 {
42849 {
42850 if (Main.tile[
l,
m] ==
null)
42851 {
42852 Main.tile[
l,
m] =
new Tile();
42853 }
42854 vector5.X =
l * 16;
42855 vector5.Y =
m * 16;
42857 {
42858 continue;
42859 }
42860 Tile tile = Main.tile[
l,
m];
42862 {
42863 continue;
42864 }
42865 if (Main.player[
owner].grapCount < 10)
42866 {
42868 Main.player[
owner].grapCount++;
42869 }
42870 if (Main.myPlayer !=
owner)
42871 {
42872 continue;
42873 }
42876 int num16 = 100000;
42878 {
42879 for (
int n = 0;
n < 1000;
n++)
42880 {
42881 if (
n !=
whoAmI && Main.projectile[
n].active && Main.projectile[
n].owner ==
owner && Main.projectile[
n].aiStyle == 7 && Main.projectile[
n].ai[0] == 2f)
42882 {
42883 Main.projectile[
n].Kill();
42884 }
42885 }
42886 }
42887 else
42888 {
42891 {
42893 }
42895 {
42897 }
42899 {
42901 }
42903 {
42905 }
42907 {
42909 }
42911 {
42912 if (Main.projectile[
num18].active && Main.projectile[
num18].owner ==
owner && Main.projectile[
num18].aiStyle == 7)
42913 {
42914 if (Main.projectile[
num18].timeLeft <
num16)
42915 {
42918 }
42920 }
42921 }
42923 {
42924 Main.projectile[
num15].Kill();
42925 }
42926 }
42929 velocity.X = 0f;
42930 velocity.Y = 0f;
42932 position.X =
l * 16 + 8 -
width / 2;
42933 position.Y =
m * 16 + 8 -
height / 2;
42936 {
42938 }
42941 if (Main.myPlayer ==
owner)
42942 {
42944 {
42945 Main.player[
owner].DoQueenSlimeHookTeleport(
base.Center);
42946 }
42947 NetMessage.SendData(13, -1, -1,
null,
owner);
42948 }
42949 break;
42950 }
42952 {
42953 break;
42954 }
42955 }
42956 }
42957 else if (
ai[0] == 1f)
42958 {
42961 {
42963 }
42965 {
42967 }
42969 {
42971 }
42973 {
42975 }
42977 {
42978 num19 = 11f + (float)(
type - 230) * 0.75f;
42979 }
42981 {
42983 }
42985 {
42987 }
42989 {
42991 }
42993 {
42995 }
42997 {
42999 }
43001 {
43003 }
43005 {
43007 }
43011 velocity.X = num;
43013 }
43014 else if (
ai[0] == 2f)
43015 {
43018 {
43020 }
43021 bool flag = true;
43023 {
43024 flag = false;
43025 }
43026 if (flag)
43027 {
43029 }
43030 else if (Main.player[
owner].grapCount < 10)
43031 {
43033 Main.player[
owner].grapCount++;
43034 }
43035 }
43036 }
void Add(TKey key, TValue value)
static double Atan2(double y, double x)
static double Sqrt(double d)
static decimal Round(decimal d)
static void PlaySound(int type, Vector2 position, int style=1)
static bool[] CrackedBricks
bool AI_007_GrapplingHooks_CanTileBeLatchedOnTo(Tile theTile)
References Terraria.Lighting.AddLight(), Terraria.Projectile.ai, Terraria.Projectile.aiStyle, System.Math.Atan2(), Terraria.DelegateMethods.CastLightOpen(), Terraria.Entity.Center, Terraria.ID.TileID.Sets.CrackedBricks, Terraria.Framing.GetTileSafely(), Terraria.WorldGen.GetTileVisualHitbox(), Terraria.Player.grapCount, Terraria.Player.grappling, Terraria.WorldGen.KillTile(), System.list, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.myPlayer, Terraria.Tile.nactive(), Terraria.Main.netMode, System.Math.PI, Terraria.ID.TileID.Sets.Platforms, Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Utils.PlotTileLine(), Terraria.Main.projectile, Terraria.Main.projFrames, Terraria.Main.rand, System.Math.Round(), Terraria.NetMessage.SendData(), System.Math.Sqrt(), Terraria.DataStructures.Tile, Terraria.Main.tile, System.type, Terraria.Tile.type, Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Point.Y, Microsoft.Xna.Framework.Vector2.Y, and Microsoft.Xna.Framework.Vector3.Zero.