mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 14:52:01 +00:00
- fixed sprite z coordinate calculation for flatsprites.
This commit is contained in:
parent
cc784fff14
commit
6b0b7ea049
1 changed files with 8 additions and 14 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue