Made the automap account for SpriteRotation.

The automap now also accounts for the SpriteRotation property of the actors. it renders as sprites.
This commit is contained in:
inkoalawetrust 2024-01-26 15:04:33 +02:00 committed by Rachael Alexanderson
parent dbd6059894
commit b3fabb0a7e

View file

@ -2969,7 +2969,7 @@ void DAutomap::drawThings ()
const size_t spriteIndex = sprite.spriteframes + (show > 1 ? t->frame : 0);
frame = &SpriteFrames[spriteIndex];
DAngle angle = DAngle::fromDeg(270. + 22.5) - t->InterpolatedAngles(r_viewpoint.TicFrac).Yaw;
DAngle angle = DAngle::fromDeg(270. + 22.5) - t->InterpolatedAngles(r_viewpoint.TicFrac).Yaw - t->SpriteRotation;
if (frame->Texture[0] != frame->Texture[1]) angle += DAngle::fromDeg(180. / 16);
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{