Queen Bee Hornet rotation fix.

This commit is contained in:
mountaindrew10 committed 2024-07-14 16:49:24 -05:00
1 parent 2e6176018a
commit 2b6fd96c31
1 file changed
+3 -6
@@ -3635,6 +3635,7 @@ PrepareToShoot:
npc.localAI[2] = 0f;
npc.SyncVanillaLocalAI();
}
if (npc.localAI[1] == 0f)
{
npc.alpha = 0;
@@ -3816,15 +3817,11 @@ PrepareToShoot:
}
if (targetData.Center.X - npc.Center.X > 0f)
{
npc.spriteDirection = -1;
npc.rotation = (float)Math.Atan2(targetData.Center.Y - npc.Center.Y, targetData.Center.X - npc.Center.X);
}
else
{
npc.spriteDirection = 1;
npc.rotation = (float)Math.Atan2(targetData.Center.Y - npc.Center.Y, targetData.Center.X - npc.Center.X) + MathHelper.Pi;
}
npc.rotation = npc.velocity.X * 0.1f;
float reboundSpeed = 0.7f;
if (npc.collideX)