From 2fa7d8a49fbb45e8ffebcaac7b1d6fb6462b5f0f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 19 Jan 2020 18:35:57 -0500 Subject: [PATCH] minor refactor --- NPCs/CalamityGlobalNPC.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b05e7e3401..22c088ef95 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2703,14 +2703,13 @@ namespace CalamityMod.NPCs for (int num262 = 0; num262 < num261; num262 = num + 1) { int num263 = NPC.NewNPC((int)(npc.position.X + npc.width / 2), (int)(npc.position.Y + npc.height), 1, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num263].SetDefaults(-5, -1f); - Main.npc[num263].velocity.X = npc.velocity.X * 2f; - Main.npc[num263].velocity.Y = npc.velocity.Y; - NPC var_324_BB1A_cp_0_cp_0 = Main.npc[num263]; - var_324_BB1A_cp_0_cp_0.velocity.X += Main.rand.Next(-20, 20) * 0.1f + num262 * npc.direction * 0.3f; - NPC var_324_BB6F_cp_0_cp_0 = Main.npc[num263]; - var_324_BB6F_cp_0_cp_0.velocity.Y -= Main.rand.Next(0, 10) * 0.1f + num262; - Main.npc[num263].ai[0] = -1000 * Main.rand.Next(3); + NPC npc = Main.npc[num263]; + npc.SetDefaults(-5, -1f); + npc.velocity.X = npc.velocity.X * 2f; + npc.velocity.Y = npc.velocity.Y; + npc.velocity.X += Main.rand.Next(-20, 20) * 0.1f + num262 * npc.direction * 0.3f; + npc.velocity.Y -= Main.rand.Next(0, 10) * 0.1f + num262; + npc.ai[0] = -1000 * Main.rand.Next(3); if (Main.netMode == NetmodeID.Server && num263 < 200) {