From 36705b0f040290bdc53e00d5245f24d80de5b71b Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Thu, 28 Jul 2016 16:47:04 -0500 Subject: [PATCH] Added GZDoom version of SpriteAngle and SpriteRotation. --- src/gl/scene/gl_sprite.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index d144da8fd..98e0fb8d5 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -722,7 +722,11 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { bool mirror; DAngle ang = (thingpos - ViewPos).Angle(); - FTextureID patch = gl_GetSpriteFrame(spritenum, thing->frame, -1, (ang - thing->Angles.Yaw).BAMs(), &mirror); + FTextureID patch; + if (thing->flags7 & MF7_SPRITEANGLE) + patch = gl_GetSpriteFrame(spritenum, thing->frame, -1, (thing->SpriteAngle).BAMs(), &mirror); + else + patch = gl_GetSpriteFrame(spritenum, thing->frame, -1, (ang - (thing->Angles.Yaw + thing->SpriteRotation)).BAMs(), &mirror); if (!patch.isValid()) return; int type = thing->renderflags & RF_SPRITETYPEMASK; gltexture = FMaterial::ValidateTexture(patch, (type == RF_FACESPRITE), false);