mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +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);
|
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);
|
bottomclip = rendersector->PortalBlocksMovement(sector_t::floor) ? -LARGE_VALUE : rendersector->GetPortalPlaneZ(sector_t::floor);
|
||||||
|
|
||||||
|
DWORD spritetype = (thing->renderflags & RF_SPRITETYPEMASK);
|
||||||
x = thingpos.X;
|
x = thingpos.X;
|
||||||
|
z = thingpos.Z;
|
||||||
y = thingpos.Y;
|
y = thingpos.Y;
|
||||||
|
if (spritetype == RF_FLATSPRITE) z -= thing->Floorclip;
|
||||||
|
|
||||||
DWORD spritetype = thing->renderflags & RF_SPRITETYPEMASK;
|
// [RH] Make floatbobbing a renderer-only effect.
|
||||||
|
if (thing->flags2 & MF2_FLOATBOB)
|
||||||
switch (spritetype)
|
|
||||||
{
|
{
|
||||||
case RF_FLATSPRITE:
|
float fz = thing->GetBobOffset(r_TicFracF);
|
||||||
z = thingpos.Z;
|
z += fz;
|
||||||
default:
|
|
||||||
z = thingpos.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));
|
modelframe = gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
|
||||||
if (!modelframe)
|
if (!modelframe)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue