Use angle between viewz and mobj z to determine splat sprite angle

This commit is contained in:
James R 2022-10-31 19:03:09 -07:00 committed by Eidolon
parent 877d5450d5
commit 04855a85dc
2 changed files with 15 additions and 4 deletions

View file

@ -5195,9 +5195,16 @@ static void HWR_ProjectSprite(mobj_t *thing)
I_Error("sprframes NULL for sprite %d\n", thing->sprite);
#endif
ang = R_PointToAngle (interp.x, interp.y) - interp.angle;
if (mirrored)
ang = InvAngle(ang);
if (splat)
{
ang = R_PointToAngle2(0, viewz, 0, interp.z);
}
else
{
ang = R_PointToAngle (interp.x, interp.y) - interp.angle;
if (mirrored)
ang = InvAngle(ang);
}
if (sprframe->rotate == SRF_SINGLE)
{

View file

@ -1586,7 +1586,11 @@ static void R_ProjectSprite(mobj_t *thing)
I_Error("R_ProjectSprite: sprframes NULL for sprite %d\n", thing->sprite);
#endif
if (sprframe->rotate != SRF_SINGLE || papersprite)
if (splat)
{
ang = R_PointToAngle2(0, viewz, 0, interp.z);
}
else if (sprframe->rotate != SRF_SINGLE || papersprite)
{
ang = R_PointToAngle (interp.x, interp.y) - interp.angle;
if (mirrored)