From 55e16f676f5ad2201d7ecf07878ecb919cfa4cb9 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Thu, 4 Nov 2021 11:22:12 -0500 Subject: [PATCH] Rotation/direction fixes --- ExtraTextures/AresArmTopPart1.png | Bin 731 -> 715 bytes NPCs/ExoMechs/Ares/AresBody.cs | 33 ++++++++++--------- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 6 ++++ NPCs/ExoMechs/Ares/AresLaserCannon.cs | 6 ++++ NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 6 ++++ NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 8 ++++- 6 files changed, 43 insertions(+), 16 deletions(-) diff --git a/ExtraTextures/AresArmTopPart1.png b/ExtraTextures/AresArmTopPart1.png index fc58f490580d2ff418b8a51915c3dba420bca3dc..02b7d68335006240a9b2a93de7b82559ff145189 100644 GIT binary patch delta 614 zcmV-s0-62W1>+^=kA93N?q5};3H7>=8bly-k5 zNIOj_A+ZdFHhPMzRYz_mVqGtlbv>Ps_Em9GlyE+i64ak2WJ<;3p{0)~MH1$6zg%2P zgc;3PiIVcbNRjhqNK2elIj<{H+tEX$rJVcDcIkVBO}REoih%Un_VQxR)*{M-gYbDN z68#u^p~5Vnc-uMa@F0}9wC~NIT~yg zIrxe=>8)0WqV!DC2v^PUJ29=jr%MnL;irK%T#1w_IjDf(Nqyv2E;Rlfb9_neiItLE z|6Bu!E!^T#dGE3AIijVYl;0kc{v7=)0n+RB6Rp3FDfkVX%m4rY07*qoM6N<$g2YfA AMF0Q* delta 630 zcmV-+0*U?01=|IXNj(-4956XW9v~r@=iFhBo-;ToX6{N4M%YrXoU8Yj6-I-RN8oyh?LYc+~(NcWDMC&vSSNOAnq886M1OJ%M| z`<)_EB~tgl*Xy#Z#`Ss@kCrlcnxvd(3V^D8%FxItc$4XJAG|zwA zcB^cgclA_+KiHwhE(>C>GIO4igrS6{9WR}xc@8DV+pR@%wyGY&l#B9mc4O5Dl)5&T z87mC@%TfkKbGHfubKdueC1^*ElM+-YYjg$9q4rnK*Ub2Wc8ez&>$L%A%7KuVnPFEY&y<2t{|dH2wtYk?y}rJ^rNnuZ zGfK+lCn+zn%Z0`&YBg99sAH0~V?#<{=^^E%t)`NTBO3(qvC?TuDPCbQG>U&vv%f~u zC`O`1&^AFR1(!ZsMoERw2!rA6vfEy7o+}(y{^ry}c zB`u;jl2UDymW3nQJsWEo#z^&Y1I`h94Ydfn{Q;$p^g2e2yIiwCpjVETzQ=3$^urSn zK$D4IiR~j?^mqO>>Gv?N arm1ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm1DrawPosition, armSegmentDrawPosition, 466920161); - List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(armSegmentDrawPosition, arm2DrawPosition, 250290787); - LightningBackgroundDrawer.Draw(arm1ElectricArcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(arm1ElectricArcPoints, -Main.screenPosition, 90); + List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(armSegmentDrawPosition, arm2DrawPosition + arm2Rotation.ToRotationVector2() * -direction * 20f, 250290787); LightningBackgroundDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); LightningDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); @@ -925,13 +928,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares armSegmentDrawPosition += Vector2.UnitY * npc.gfxOffY - Main.screenPosition; arm2DrawPosition += Vector2.UnitY * npc.gfxOffY - Main.screenPosition; - spriteBatch.Draw(armTexture1, arm1DrawPosition, null, shoulderLightColor, arm1Rotation, arm1Origin, npc.scale, spriteDirection, 0f); + spriteBatch.Draw(armTexture1, arm1DrawPosition, null, arm1LightColor, arm1Rotation, arm1Origin, npc.scale, spriteDirection ^ SpriteEffects.FlipHorizontally, 0f); spriteBatch.Draw(shoulderTexture, shoulderDrawPosition, null, shoulderLightColor, 0f, shoulderTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); spriteBatch.Draw(shoulderGlowmask, shoulderDrawPosition, null, glowmaskColor, 0f, shoulderTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); - spriteBatch.Draw(armSegmentTexture, armSegmentDrawPosition, null, shoulderLightColor, arm2Rotation, armSegmentTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); - spriteBatch.Draw(armSegmentGlowmask, armSegmentDrawPosition, null, glowmaskColor, arm2Rotation, armSegmentTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); - spriteBatch.Draw(armTexture2, arm2DrawPosition, null, shoulderLightColor, arm2Rotation, arm2Origin, npc.scale, spriteDirection, 0f); - spriteBatch.Draw(armGlowmask2, arm2DrawPosition, null, glowmaskColor, arm2Rotation, arm2Origin, npc.scale, spriteDirection, 0f); + spriteBatch.Draw(armSegmentTexture, armSegmentDrawPosition, null, armSegmentLightColor, armSegmentRotation, armSegmentTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); + spriteBatch.Draw(armSegmentGlowmask, armSegmentDrawPosition, null, glowmaskColor, armSegmentRotation, armSegmentTexture.Size() * 0.5f, npc.scale, spriteDirection, 0f); + spriteBatch.Draw(armTexture2, arm2DrawPosition, null, arm2LightColor, arm2Rotation, arm2Origin, npc.scale, spriteDirection ^ SpriteEffects.FlipVertically, 0f); + spriteBatch.Draw(armGlowmask2, arm2DrawPosition, null, glowmaskColor, arm2Rotation, arm2Origin, npc.scale, spriteDirection ^ SpriteEffects.FlipVertically, 0f); } public override void BossLoot(ref string name, ref int potionType) diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index 89cfc11d88..51e9218642 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -83,6 +83,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; + npc.hide = true; music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; } @@ -527,6 +528,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares return false; } + public override void DrawBehind(int index) + { + Main.instance.DrawCacheNPCProjectiles.Add(index); + } + public override bool PreNPCLoot() => false; public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 50869cd283..f2dc6179ba 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -81,6 +81,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; + npc.hide = true; music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; } @@ -583,6 +584,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares return false; } + public override void DrawBehind(int index) + { + Main.instance.DrawCacheNPCProjectiles.Add(index); + } + public override bool PreNPCLoot() => false; public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 1acc67759c..38819a20a8 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -81,6 +81,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; + npc.hide = true; music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; } @@ -511,6 +512,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares return false; } + public override void DrawBehind(int index) + { + Main.instance.DrawCacheNPCProjectiles.Add(index); + } + public override bool PreNPCLoot() => false; public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 1e4640db47..cb9b3fa316 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -81,6 +81,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; + npc.hide = true; music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; } @@ -508,7 +509,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares return false; } - + + public override void DrawBehind(int index) + { + Main.instance.DrawCacheNPCProjectiles.Add(index); + } + public override bool PreNPCLoot() => false; public override void HitEffect(int hitDirection, double damage)