mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 15:32:57 +00:00
Fixed: Slanted flat + roll sprites didn't take DONTFLIP into account.
This commit is contained in:
parent
e58c6de7d6
commit
b2d2389343
1 changed files with 4 additions and 3 deletions
|
@ -333,11 +333,12 @@ void GLSprite::Draw(int pass)
|
||||||
angto = deltaangle(actor->Angles.Yaw, angto);
|
angto = deltaangle(actor->Angles.Yaw, angto);
|
||||||
|
|
||||||
float pitchDegrees = actor->Angles.Pitch.Degrees;
|
float pitchDegrees = actor->Angles.Pitch.Degrees;
|
||||||
mat.Rotate(0, 1, 0, (!dontFlip || (fabs(angto) < 90.)) ? 0 : 180);
|
bool noFlipSprite = (!dontFlip || (fabs(angto) < 90.));
|
||||||
mat.Rotate(-yawvecY, 0, yawvecX, pitchDegrees);
|
mat.Rotate(0, 1, 0, (noFlipSprite) ? 0 : 180);
|
||||||
|
mat.Rotate(-yawvecY, 0, yawvecX, (noFlipSprite) ? -pitchDegrees : pitchDegrees);
|
||||||
if (drawRollSpriteActor)
|
if (drawRollSpriteActor)
|
||||||
{
|
{
|
||||||
mat.Rotate(yawvecX, 0, yawvecY, rollDegrees);
|
mat.Rotate(yawvecX, 0, yawvecY, (noFlipSprite) ? -rollDegrees : rollDegrees);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [fgsfds] Rotate the sprite about the sight vector (roll)
|
// [fgsfds] Rotate the sprite about the sight vector (roll)
|
||||||
|
|
Loading…
Reference in a new issue