- completely reviewed and fixed all codes using angles in the automap.

This commit is contained in:
Christoph Oelckers 2016-04-07 13:05:29 +02:00
parent a1c03c9a62
commit 1eeaee1ac7

View file

@ -1191,7 +1191,7 @@ void AM_changeWindowLoc ()
oincy = incy = m_paninc.y * SCREENHEIGHT / 200;
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotate(&incx, &incy, players[consoleplayer].camera->Angles.Yaw + 90.);
AM_rotate(&incx, &incy, players[consoleplayer].camera->Angles.Yaw - 90.);
}
m_x += incx;
@ -1573,7 +1573,7 @@ void AM_doFollowPlayer ()
sy = (f_oldloc.y - players[consoleplayer].camera->Y());
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotate (&sx, &sy, players[consoleplayer].camera->Angles.Yaw + 90);
AM_rotate (&sx, &sy, players[consoleplayer].camera->Angles.Yaw - 90);
}
AM_ScrollParchment (sx, sy);
@ -2713,7 +2713,7 @@ void AM_drawPlayers ()
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&pt.x, &pt.y);
angle -= players[consoleplayer].camera->Angles.Yaw + 90.;
angle -= players[consoleplayer].camera->Angles.Yaw - 90.;
}
AM_drawLineCharacter(&MapArrow[0], MapArrow.Size(), 0, angle, color, pt.x, pt.y);
@ -2802,11 +2802,11 @@ void AM_drawThings ()
const size_t spriteIndex = sprite.spriteframes + (show > 1 ? t->frame : 0);
frame = &SpriteFrames[spriteIndex];
DAngle angle = -t->Angles.Yaw + 90.;
DAngle angle = 270. -t->Angles.Yaw;
if (frame->Texture[0] != frame->Texture[1]) angle += 180. / 16;
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
angle += players[consoleplayer].camera->Angles.Yaw + 90.;
angle += players[consoleplayer].camera->Angles.Yaw - 90.;
}
rotation = int((angle.Normalized360() * (16. / 360.)).Degrees);