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

◆ CacheNPCDraws()

void Terraria.Main.CacheNPCDraws ( )
inlineprotected

Definition at line 34699 of file Main.cs.

34700 {
34705 for (int i = 0; i < 200; i++)
34706 {
34707 if (!npc[i].active)
34708 {
34709 continue;
34710 }
34711 if (npc[i].type == 398 && npc[i].ai[0] >= 0f)
34712 {
34713 int num = i;
34714 int num2 = -1;
34715 int num3 = -1;
34716 int num4 = -1;
34717 for (int j = 0; j < 200; j++)
34718 {
34719 if (npc[j].active && npc[j].ai[3] == (float)num)
34720 {
34721 if (num2 == -1 && npc[j].type == 397 && npc[j].ai[2] == 0f)
34722 {
34723 num2 = j;
34724 }
34725 if (num3 == -1 && npc[j].type == 397 && npc[j].ai[2] == 1f)
34726 {
34727 num3 = j;
34728 }
34729 if (num4 == -1 && npc[j].type == 396)
34730 {
34731 num4 = j;
34732 }
34733 if (num2 != -1 && num3 != -1 && num4 != -1)
34734 {
34735 break;
34736 }
34737 }
34738 }
34739 if (num2 != -1 && num3 != -1 && num4 != -1)
34740 {
34742 if (num2 != -1)
34743 {
34745 }
34746 if (num3 != -1)
34747 {
34749 }
34750 if (num4 != -1)
34751 {
34753 }
34754 }
34755 }
34756 else if (npc[i].type == 421 && npc[i].ai[0] == 5f)
34757 {
34759 }
34760 else if (npc[i].type == 516 || npc[i].type == 519)
34761 {
34763 }
34764 else if (npc[i].type == 548)
34765 {
34767 }
34768 }
34769 }
List< int > DrawCacheNPCProjectiles
Definition Main.cs:2233
List< int > DrawCacheNPCsBehindNonSolidTiles
Definition Main.cs:2235
List< int > DrawCacheNPCsOverPlayers
Definition Main.cs:2231
List< int > DrawCacheNPCsMoonMoon
Definition Main.cs:2229
static NPC[] npc
Definition Main.cs:1685

References System.Collections.Generic.List< T >.Add(), System.Collections.Generic.List< T >.Clear(), Terraria.Main.DrawCacheNPCProjectiles, Terraria.Main.DrawCacheNPCsBehindNonSolidTiles, Terraria.Main.DrawCacheNPCsMoonMoon, Terraria.Main.DrawCacheNPCsOverPlayers, System.Text.RegularExpressions.i, Terraria.Main.npc, and System.type.

Referenced by Terraria.Main.DoDraw_WallsTilesNPCs(), and Terraria.Main.DrawCapture().