- fixed sprite z coordinate calculation for flatsprites.

This commit is contained in:
Christoph Oelckers 2016-07-04 01:00:01 +02:00
parent cc784fff14
commit 6b0b7ea049

View file

@ -689,25 +689,19 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
topclip = rendersector->PortalBlocksMovement(sector_t::ceiling) ? LARGE_VALUE : rendersector->GetPortalPlaneZ(sector_t::ceiling);
bottomclip = rendersector->PortalBlocksMovement(sector_t::floor) ? -LARGE_VALUE : rendersector->GetPortalPlaneZ(sector_t::floor);
DWORD spritetype = (thing->renderflags & RF_SPRITETYPEMASK);
x = thingpos.X;
y = thingpos.Y;
DWORD spritetype = thing->renderflags & RF_SPRITETYPEMASK;
switch (spritetype)
{
case RF_FLATSPRITE:
z = thingpos.Z;
default:
z = thingpos.Z - thing->Floorclip;
y = thingpos.Y;
if (spritetype == RF_FLATSPRITE) z -= thing->Floorclip;
// [RH] Make floatbobbing a renderer-only effect.
if (thing->flags2 & MF2_FLOATBOB)
{
float fz = thing->GetBobOffset(r_TicFracF);
z += fz;
}
break;
}
modelframe = gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
if (!modelframe)
{