1 - Fixed Provi Guardian rotations.

This commit is contained in:
Andrew Marheine committed 2022-01-13 16:12:01 -06:00
1 parent 8e4fffcbe7
commit b9a03db967
3 files changed
+9 -12

No files matched your search

+3 -4
View File
@@ -97,10 +97,9 @@ namespace CalamityMod.NPCs.Providence
start = false;
}
npc.TargetClosest();
Vector2 velocity = Main.player[npc.target].Center - npc.Center;
velocity.Normalize();
npc.rotation = velocity.ToRotation() + MathHelper.Pi;
float playerLocation = npc.Center.X - Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target].Center.X;
npc.direction = playerLocation < 0 ? 1 : -1;
npc.spriteDirection = npc.direction;
double deg = npc.ai[1];
double rad = deg * (Math.PI / 180);
+3 -4
View File
@@ -95,10 +95,9 @@ namespace CalamityMod.NPCs.Providence
start = false;
}
npc.TargetClosest();
Vector2 velocity = Main.player[npc.target].Center - npc.Center;
velocity.Normalize();
npc.rotation = velocity.ToRotation() + MathHelper.Pi;
float playerLocation = npc.Center.X - Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target].Center.X;
npc.direction = playerLocation < 0 ? 1 : -1;
npc.spriteDirection = npc.direction;
double deg = npc.ai[1];
double rad = deg * (Math.PI / 180);
+3 -4
View File
@@ -98,10 +98,9 @@ namespace CalamityMod.NPCs.Providence
start = false;
}
npc.TargetClosest();
Vector2 velocity = Main.player[npc.target].Center - npc.Center;
velocity.Normalize();
npc.rotation = velocity.ToRotation() + MathHelper.Pi;
float playerLocation = npc.Center.X - Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target].Center.X;
npc.direction = playerLocation < 0 ? 1 : -1;
npc.spriteDirection = npc.direction;
double deg = npc.ai[1];
double rad = deg * (Math.PI / 180);