mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-27 22:22:08 +00:00
Added GZDoom version of SpriteAngle and SpriteRotation.
This commit is contained in:
parent
50765f8b79
commit
36705b0f04
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue