This commit is contained in:
nashmuhandes 2024-03-10 03:34:37 +08:00
commit 74a27be3fd
114 changed files with 3366 additions and 1677 deletions

View file

@ -2958,7 +2958,8 @@ void DAutomap::drawThings ()
if (am_cheat > 0 || !(t->flags6 & MF6_NOTONAUTOMAP)
|| (am_thingrenderstyles && !(t->renderflags & RF_INVISIBLE) && !(t->flags6 & MF6_NOTONAUTOMAP)))
{
DVector3 pos = t->InterpolatedPosition(r_viewpoint.TicFrac) + t->Level->Displacements.getOffset(sec.PortalGroup, MapPortalGroup);
DVector3 fracPos = t->InterpolatedPosition(r_viewpoint.TicFrac);
FVector2 pos = FVector2(float(fracPos.X),float(fracPos.Y)) + FVector2(t->Level->Displacements.getOffset(sec.PortalGroup, MapPortalGroup)) + FVector2(t->AutomapOffsets);
p.x = pos.X;
p.y = pos.Y;
@ -2968,14 +2969,14 @@ void DAutomap::drawThings ()
spriteframe_t *frame;
int rotation = 0;
// try all modes backwards until a valid texture has been found.
// try all modes backwards until a valid texture has been found.
for(int show = am_showthingsprites; show > 0 && texture == nullptr; show--)
{
const spritedef_t& sprite = sprites[t->sprite];
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.) - 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))
{