Fixed PrismBack causing crashes
This commit is contained in:
1 parent
c1e82b7a51
commit
1de76ccc4d
1 file changed
+2
-2
@@ -126,10 +126,10 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Blue);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow").Value, vector,
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user