mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Blood: Fix model yoffset
This commit is contained in:
parent
f1f9fcff5c
commit
1ef8df0a4c
2 changed files with 14 additions and 0 deletions
|
@ -2416,6 +2416,18 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
pTSprite->ang = (pTSprite->ang+((int)totalclock<<3))&2047;
|
pTSprite->ang = (pTSprite->ang+((int)totalclock<<3))&2047;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((pTSprite->cstat&48) != 48 && usemodels && !(spriteext[nSprite].flags&SPREXT_NOTMD))
|
||||||
|
{
|
||||||
|
int nAnimTile = pTSprite->picnum + animateoffs_replace(pTSprite->picnum, 32768+pTSprite->owner);
|
||||||
|
|
||||||
|
if (usemodels && tile2model[Ptile2tile(nAnimTile, pTSprite->pal)].modelid >= 0 &&
|
||||||
|
tile2model[Ptile2tile(nAnimTile, pTSprite->pal)].framenum >= 0)
|
||||||
|
{
|
||||||
|
pTSprite->yoffset += picanm[nAnimTile].yofs;
|
||||||
|
pTSprite->xoffset += picanm[nAnimTile].xofs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sectortype *pSector = §or[pTSprite->sectnum];
|
sectortype *pSector = §or[pTSprite->sectnum];
|
||||||
XSECTOR *pXSector;
|
XSECTOR *pXSector;
|
||||||
int nShade = pTSprite->shade;
|
int nShade = pTSprite->shade;
|
||||||
|
|
|
@ -1527,6 +1527,8 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
||||||
|
|
||||||
// Parkar: Moved up to be able to use k0 for the y-flipping code
|
// Parkar: Moved up to be able to use k0 for the y-flipping code
|
||||||
k0 = (float)tspr->z+spriteext[tspr->owner].position_offset.z;
|
k0 = (float)tspr->z+spriteext[tspr->owner].position_offset.z;
|
||||||
|
f = ((globalorientation&8) && (sprite[tspr->owner].cstat&48)!=0) ? -4.f : 4.f;
|
||||||
|
k0 -= (tspr->yoffset*tspr->yrepeat)*f;
|
||||||
if ((globalorientation&128) && !((globalorientation&48)==32))
|
if ((globalorientation&128) && !((globalorientation&48)==32))
|
||||||
k0 += (float)(sizyrep<<1);
|
k0 += (float)(sizyrep<<1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue