- Fixed model float-bobbing by having the bob offset applied earlier in GLSprite::Process().

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1556 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2013-04-28 08:39:22 +00:00
parent adeb34ed6f
commit 24e09cf31a

View file

@ -514,6 +514,13 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
x = FIXED2FLOAT(thingx);
z = FIXED2FLOAT(thingz-thing->floorclip);
y = FIXED2FLOAT(thingy);
// [RH] Make floatbobbing a renderer-only effect.
if (thing->flags2 & MF2_FLOATBOB)
{
float fz = FIXED2FLOAT(thing->GetBobOffset(r_TicFrac));
z += fz;
}
modelframe = gl_FindModelFrame(RUNTIME_TYPE(thing), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
if (!modelframe)
@ -668,16 +675,7 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
x1=x-viewvecY*leftfac;
x2=x-viewvecY*rightfac;
y1=y+viewvecX*leftfac;
y2=y+viewvecX*rightfac;
// [RH] Make floatbobbing a renderer-only effect.
if (thing->flags2 & MF2_FLOATBOB)
{
float fz = FIXED2FLOAT(thing->GetBobOffset(r_TicFrac));
z1 += fz;
z2 += fz;
}
y2=y+viewvecX*rightfac;
}
else
{