This commit is contained in:
commit
118976129d
12 changed files with 44 additions and 10 deletions
|
|
@ -521,7 +521,7 @@ void gl_InitModels()
|
|||
path = "";
|
||||
sc.MustGetString();
|
||||
memset(&smf, 0, sizeof(smf));
|
||||
smf.modelIDs[1] = smf.modelIDs[2] = smf.modelIDs[3] = -1;
|
||||
smf.modelIDs[0] = smf.modelIDs[1] = smf.modelIDs[2] = smf.modelIDs[3] = -1;
|
||||
smf.xscale=smf.yscale=smf.zscale=1.f;
|
||||
|
||||
smf.type = PClass::FindClass(sc.String);
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
sprangle = 0.;
|
||||
rot = 0;
|
||||
}
|
||||
patch = sprites[spritenum].GetSpriteFrame(thing->frame, rot, sprangle, &mirror);
|
||||
patch = sprites[spritenum].GetSpriteFrame(thing->frame, rot, sprangle, &mirror, !!(thing->flags7 & MF7_SPRITEFLIP));
|
||||
}
|
||||
|
||||
if (!patch.isValid()) return;
|
||||
|
|
@ -814,6 +814,11 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
if (thing->renderflags & RF_YFLIP) std::swap(vt, vb);
|
||||
|
||||
gltexture->GetSpriteRect(&r);
|
||||
|
||||
// [SP] SpriteFlip
|
||||
if (thing->flags7 & MF7_SPRITEFLIP)
|
||||
thing->renderflags ^= RF_XFLIP;
|
||||
|
||||
if (mirror ^ !!(thing->renderflags & RF_XFLIP))
|
||||
{
|
||||
r.left = -r.width - r.left; // mirror the sprite's x-offset
|
||||
|
|
@ -826,6 +831,9 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
ur = gltexture->GetSpriteUL();
|
||||
}
|
||||
|
||||
if (thing->flags7 & MF7_SPRITEFLIP) // [SP] Flip back
|
||||
thing->renderflags ^= RF_XFLIP;
|
||||
|
||||
r.Scale(sprscale.X, sprscale.Y);
|
||||
|
||||
float rightfac = -r.left;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue