From b2d2389343cbd2ac8247a321cf229a22bb14956d Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 5 Jun 2016 15:21:19 -0500 Subject: [PATCH] Fixed: Slanted flat + roll sprites didn't take DONTFLIP into account. --- src/gl/scene/gl_sprite.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 37d9ebd82..fb6d6b411 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -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)