mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 06:42:09 +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);
|
||||
|
||||
float pitchDegrees = actor->Angles.Pitch.Degrees;
|
||||
mat.Rotate(0, 1, 0, (!dontFlip || (fabs(angto) < 90.)) ? 0 : 180);
|
||||
mat.Rotate(-yawvecY, 0, yawvecX, pitchDegrees);
|
||||
bool noFlipSprite = (!dontFlip || (fabs(angto) < 90.));
|
||||
mat.Rotate(0, 1, 0, (noFlipSprite) ? 0 : 180);
|
||||
mat.Rotate(-yawvecY, 0, yawvecX, (noFlipSprite) ? -pitchDegrees : pitchDegrees);
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue