Have correct sprite angle-frame face the camera with orthographic projection enabled.

This commit is contained in:
Dileep V. Reddy 2024-07-11 20:07:57 -06:00
parent e647b61633
commit e9f3d39c93
No known key found for this signature in database
GPG key ID: 7E1FE104B057EBF3
2 changed files with 3 additions and 3 deletions

View file

@ -913,7 +913,7 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
{
bool mirror = false;
DAngle ang = (thingpos - vp.Pos).Angle();
if (thing->renderflags2 & RF2_ISOMETRICSPRITES) ang = vp.Angles.Yaw;
if ((vp.camera->ViewPos != NULL) && (vp.camera->ViewPos->Flags & VPSF_ORTHOGRAPHIC)) ang = vp.Angles.Yaw;
FTextureID patch;
// [ZZ] add direct picnum override
if (isPicnumOverride)

View file

@ -158,7 +158,7 @@ class SpectatorCamera : Actor
if(tracer != NULL)
{
if(player != NULL) zshift = -0.5*tracer.height;
else zshift = tracer.height;
else zshift = 0.5*tracer.height;
}
else if (player != NULL && player.mo != NULL) zshift = -0.5*player.mo.height;
@ -168,7 +168,7 @@ class SpectatorCamera : Actor
void LookAtSelf(double inpitch)
{
if(ViewPos.Offset != (0., 0., 0.))
if(ViewPos.Offset.length() > 0.)
{
Vector3 negviewpos = (-1.0) * ViewPos.Offset;
angle = negviewpos.Angle();