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

◆ AI_123_Deerclops_ShootRubbleUp()

void Terraria.NPC.AI_123_Deerclops_ShootRubbleUp ( ref NPCAimedTarget targetData,
ref Point sourceTileCoords,
int howMany,
int distancedByThisManyTiles,
float upBiasPerSpike,
int whichOne )
inlineprivate

Definition at line 44891 of file NPC.cs.

44892 {
44893 //IL_0039: Unknown result type (might be due to invalid IL or missing references)
44894 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
44895 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
44896 //IL_007f: Unknown result type (might be due to invalid IL or missing references)
44897 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
44898 //IL_0086: Unknown result type (might be due to invalid IL or missing references)
44899 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
44900 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
44901 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
44902 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
44903 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
44904 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
44905 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
44906 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
44907 //IL_010e: Unknown result type (might be due to invalid IL or missing references)
44908 //IL_0113: Unknown result type (might be due to invalid IL or missing references)
44909 //IL_012b: Unknown result type (might be due to invalid IL or missing references)
44910 int num = 18;
44912 Vector2 vector2 = default(Vector2);
44913 for (int i = 0; i < 35; i++)
44914 {
44915 int num3 = sourceTileCoords.X + num2 * direction;
44916 int num4 = sourceTileCoords.Y + i;
44917 if (WorldGen.SolidTile(num3, num4))
44918 {
44919 Vector2 val = targetData.Center + new Vector2((float)(num2 * direction * 20), (0f - upBiasPerSpike) * (float)howMany + (float)num2 * upBiasPerSpike / (float)distancedByThisManyTiles);
44920 ((Vector2)(ref vector2))._002Ector((float)(num3 * 16 + 8), (float)(num4 * 16 + 8));
44921 Vector2 vector3 = (val - vector2).SafeNormalize(-Vector2.UnitY);
44922 vector3 = Utils.RotatedBy(new Vector2(0f, -1f), (float)(whichOne * direction) * 0.7f * ((float)Math.PI / 4f / (float)howMany));
44923 int num5 = Main.rand.Next(Main.projFrames[962] * 4);
44924 num5 = 6 + Main.rand.Next(6);
44925 Projectile.NewProjectile(GetSpawnSource_ForProjectile(), new Vector2((float)(num3 * 16 + 8), (float)(num4 * 16 - 8)), vector3 * (8f + Main.rand.NextFloat() * 8f), 962, num, 0f, Main.myPlayer, 0f, num5);
44926 break;
44927 }
44928 }
44929 }
IEntitySource GetSpawnSource_ForProjectile()
Definition NPC.cs:107558

References Terraria.Entity.direction, Terraria.NPC.GetSpawnSource_ForProjectile(), Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.projFrames, Terraria.Main.rand, Terraria.Utils.RotatedBy(), and Terraria.WorldGen.SolidTile().

Referenced by Terraria.NPC.AI_123_Deerclops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: