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

◆ ReduceRemainingChumsInPool()

void Terraria.Projectile.ReduceRemainingChumsInPool ( )
inlineprivate

Definition at line 43778 of file Projectile.cs.

43779 {
43780 int x = (int)base.Center.X / 16;
43781 int num = (int)base.Center.Y / 16;
43783 List<int> list2 = new List<int>();
43784 for (int i = 0; i < 1000; i++)
43785 {
43786 Projectile projectile = Main.projectile[i];
43787 if (projectile.active && projectile.owner == Main.myPlayer && projectile.timeLeft > 60 && projectile.type == 820)
43788 {
43789 list.Add(new Tuple<int, Point>(i, (projectile.Center + Vector2.UnitY * 16f).ToTileCoordinates()));
43790 }
43791 }
43792 if (list.Count == 0)
43793 {
43794 return;
43795 }
43797 Point point = default(Point);
43798 for (int j = minX; j <= maxX; j++)
43799 {
43800 point.X = j;
43801 int num2 = num;
43802 while (Main.tile[j, num2].liquid > 0 && !WorldGen.SolidTile(j, num2) && num2 < Main.maxTilesY - 10)
43803 {
43804 num2 = (point.Y = num2 + 1);
43805 for (int num3 = list.Count - 1; num3 >= 0; num3--)
43806 {
43807 if (list[num3].Item2 == point)
43808 {
43809 list2.Add(list[num3].Item1);
43810 list.RemoveAt(num3);
43811 }
43812 }
43813 if (list.Count == 0)
43814 {
43815 break;
43816 }
43817 }
43818 if (list.Count == 0)
43819 {
43820 break;
43821 }
43822 }
43823 for (int k = 0; k < list2.Count; k++)
43824 {
43825 Projectile obj = Main.projectile[list2[k]];
43826 obj.ai[0] += 1f;
43827 obj.netUpdate = true;
43828 }
43829 }
void Add(TKey key, TValue value)
static void GetFishingPondWidth(int x, int y, out int minX, out int maxX)

References Terraria.Entity.active, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.Entity.Center, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.list, Terraria.Main.maxTilesY, Terraria.Main.myPlayer, System.obj, Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.WorldGen.SolidTile(), Terraria.Main.tile, Terraria.Projectile.timeLeft, Terraria.Projectile.type, and Microsoft.Xna.Framework.Vector2.UnitY.