Definition at line 20810 of file Main.cs.
20811 {
20812 bool flag = false;
20814 for (int num = 199; num >= 0; num--)
20815 {
20816 try
20817 {
20819 {
20820 npc[num].position +=
npc[num].netOffset;
20821 if (
npc[num].behindTiles == behindTiles)
20822 {
20824 {
20825 if (!
NPC.IsMechQueenUp && !flag)
20826 {
20827 flag = true;
20828 for (
int i = 0;
i < 200;
i++)
20829 {
20831 {
20832 continue;
20833 }
20834 float scale =
npc[
i].scale;
20835 float x =
npc[
i].Center.X;
20836 float num2 =
npc[
i].Bottom.Y - (float)
npc[
i].height * 0.5f * scale;
20837 float x2 =
npc[num].Center.X;
20838 float y =
npc[num].Bottom.Y - (float)
npc[num].height * 0.5f * scale;
20846 {
20848 }
20849 float num6 = 40f * scale;
20851 {
20854 {
20856 continue;
20857 }
20866 spriteBatch.Draw(
TextureAssets.
Chain12.Value,
new Vector2(
vector.X -
screenPosition.X,
vector.Y -
screenPosition.Y),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Chain12.Width(),
TextureAssets.
Chain12.Height()), color, rotation,
new Vector2((
float)
TextureAssets.
Chain12.Width() * 0.5f, (float)
TextureAssets.
Chain12.Height() * 0.5f), scale,
SpriteEffects.None, 0f);
20867 }
20868 }
20869 }
20870 }
20871 else if (
npc[num].
type == 263 &&
npc[num].aiStyle == 52 &&
NPC.plantBoss >= 0)
20872 {
20879 {
20884 {
20887 }
20893 num7 =
npc[
NPC.plantBoss].Center.X - vector2.X +
npc[
NPC.plantBoss].netOffset.X;
20894 num8 =
npc[
NPC.plantBoss].Center.Y - vector2.Y +
npc[
NPC.plantBoss].netOffset.Y;
20896 spriteBatch.Draw(
TextureAssets.
Chain26.Value,
new Vector2(
vector2.X -
screenPosition.X,
vector2.Y -
screenPosition.Y),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Chain26.Width(),
num9),
color2,
rotation2,
new Vector2((
float)
TextureAssets.
Chain26.Width() * 0.5f, (float)
TextureAssets.
Chain26.Height() * 0.5f), 1f,
SpriteEffects.None, 0f);
20897 }
20898 }
20899 else if (
npc[num].
type == 264 &&
npc[num].aiStyle == 53 &&
NPC.plantBoss >= 0)
20900 {
20902 if (
npc[num].ai[3] > 0f)
20903 {
20905 }
20912 {
20917 {
20920 }
20924 vector3.X +=
num13;
20925 vector3.Y +=
num14;
20929 spriteBatch.Draw(
TextureAssets.
Chain27.Value,
new Vector2(
vector3.X -
screenPosition.X,
vector3.Y -
screenPosition.Y),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Chain27.Width(),
num15),
color3,
rotation3,
new Vector2((
float)
TextureAssets.
Chain27.Width() * 0.5f, (float)
TextureAssets.
Chain27.Height() * 0.5f), 1f,
SpriteEffects.None, 0f);
20930 }
20931 }
20933 {
20936 }
20937 }
20938 npc[num].position -=
npc[num].netOffset;
20939 }
20940 }
20941 catch
20942 {
20943 npc[num].active =
false;
20944 }
20945 }
20946 }
static double Atan2(double y, double x)
static double Sqrt(double d)
static Asset< Texture2D > Chain27
static Asset< Texture2D > Chain12
static Asset< Texture2D > Chain26
static bool[] MustAlwaysDraw
static readonly short Count
void DrawNPC(int iNPCIndex, bool behindTiles)
static SpriteBatch spriteBatch
static Vector2 screenPosition
void DrawNPCCheckAlt(NPC n)
References System.Math.Atan2(), Terraria.GameContent.TextureAssets.Chain12, Terraria.GameContent.TextureAssets.Chain26, Terraria.GameContent.TextureAssets.Chain27, Terraria.ID.NPCID.Count, Terraria.Main.DrawNPC(), Terraria.Main.DrawNPCCheckAlt(), Terraria.Lighting.GetColor(), System.Text.RegularExpressions.i, Terraria.NPC.IsMechQueenUp, Terraria.ID.NPCID.Sets.MustAlwaysDraw, Terraria.Main.npc, Terraria.NPC.plantBoss, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.spriteBatch, System.Math.Sqrt(), System.type, and Microsoft.Xna.Framework.Graphics.Vector2.
Referenced by Terraria.Main.DoDraw_DrawNPCsBehindTiles(), Terraria.Main.DoDraw_DrawNPCsOverTiles(), and Terraria.Main.DrawCapture().