Commit adaa3da7 authored by nukeykt's avatar nukeykt Committed by Richard Gobeille
Browse files

Add sloped sprite case to spriteoncfz

parent a2ee8873
......@@ -1016,8 +1016,17 @@ void spriteoncfz(int32_t i, int32_t *czptr, int32_t *fzptr)
int32_t height, zofs;
getzsofslope(sprite[i].sectnum, sprite[i].x,sprite[i].y, czptr, fzptr);
if ((sprite[i].cstat&48)>=32)
if ((sprite[i].cstat&48)==32)
return;
if ((sprite[i].cstat&48)==48)
{
int32_t const heinum = klabs(spriteGetSlope(i));
int32_t ratio = divscale12(heinum, ksqrt(heinum*heinum+16777216));
int32_t h = mulscale11(ratio, sprite[i].yrepeat*tilesiz[sprite[i].picnum].y);
*czptr += h;
*fzptr -= h;
return;
}
zofs = spriteheightofs(i, &height, 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment