Better angle selection for rotated automap sprites

https://forum.zdoom.org/viewtopic.php?t=58348
This commit is contained in:
alexey.lysiuk 2017-12-30 12:08:32 +02:00
parent 19d25b00a3
commit a3d1efc8d6

View file

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