mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Actually fix papersprites near camera crash
This commit is contained in:
parent
d4a2bb5675
commit
c35456d5cb
1 changed files with 10 additions and 1 deletions
|
@ -844,6 +844,15 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // ditto
|
||||
}
|
||||
|
||||
// TODO This check should not be necessary. But Papersprites near to the camera will sometimes create invalid values
|
||||
// for the vissprite's startfrac. This happens because they are not depth culled like other sprites.
|
||||
// Someone who is more familiar with papersprites pls check and try to fix <3
|
||||
if (vis->startfrac < 0 || vis->startfrac > (patch->width << FRACBITS))
|
||||
{
|
||||
// never draw vissprites with startfrac out of patch range
|
||||
return;
|
||||
}
|
||||
|
||||
colfunc = colfuncs[BASEDRAWFUNC]; // hack: this isn't resetting properly somewhere.
|
||||
dc_colormap = vis->colormap;
|
||||
dc_translation = R_GetSpriteTranslation(vis);
|
||||
|
@ -2235,7 +2244,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
|
||||
vis->xscale = FixedMul(spritexscale, xscale); //SoM: 4/17/2000
|
||||
vis->scale = FixedMul(spriteyscale, yscale); //<<detailshift;
|
||||
vis->thingscale = this_scale;
|
||||
vis->thingscale = interp.scale;
|
||||
|
||||
vis->spritexscale = spritexscale;
|
||||
vis->spriteyscale = spriteyscale;
|
||||
|
|
Loading…
Reference in a new issue