Fix splat rendering issues

That goddamned Robotnik Coaster splatbooster
This commit is contained in:
yamamama 2026-03-07 01:45:36 -05:00
parent b6d418241c
commit 5f04d317b6
2 changed files with 5 additions and 5 deletions

View file

@ -748,7 +748,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
patch_t *gpatch;
GLPatch_t *hwrpatch;
FSurfaceInfo Surf = {};
const boolean affine = ((spr->mobj && !P_MobjWasRemoved(spr->mobj)) && ((spr->mobj->player != NULL) || R_ThingIsAffineSprite(spr->mobj)));
const boolean affine = ((spr->mobj && !P_MobjWasRemoved(spr->mobj)) && ((spr->mobj->player != NULL) || R_ThingIsAffineSprite(spr->mobj)) && (!R_ThingIsFloorSprite(spr->mobj)));
const boolean splat = R_ThingIsFloorSprite(spr->mobj);
if (!spr->mobj || !spr->mobj->subsector)
@ -1579,7 +1579,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
#endif
// Affines
boolean affinesprite = ((thing->player != NULL) || R_ThingIsAffineSprite(thing));
boolean affinesprite = (((thing->player != NULL) || R_ThingIsAffineSprite(thing)) && (!splat));
affine_t affine_transform = {0};
vector2_t affine_scale = {0};
f_vector2_t affine_pivotoffsetdiff = {0};

View file

@ -2079,7 +2079,7 @@ static void R_ProjectSprite(mobj_t *thing)
mobj_t *interptarg = thing;
// Affines
boolean affinesprite = ((thing->player != NULL) || R_ThingIsAffineSprite(thing));
boolean affinesprite = (((thing->player != NULL) || R_ThingIsAffineSprite(thing)) && (!splat));
affine_t affine_transform = {0};
affine_bounding_t affine_bounds = {0};
vector2_t affine_scale = {0};
@ -2583,14 +2583,14 @@ static void R_ProjectSprite(mobj_t *thing)
// This is, frankly, a ridiculous solution to a problem that never existed until I touched the renderer
// We blow up the scale of the offsets so that the RESCALED positions are still 1:1
tx += (affinesprite) ? FixedDiv(offset,FixedMul(xscale, this_scale)) : offset;
tx += (affinesprite && (!splat)) ? FixedDiv(offset,FixedMul(xscale, this_scale)) : offset;
x1 = (centerxfrac + FixedMul(tx,xscale))>>FRACBITS;
// off the right side?
if (x1 > viewwidth)
return;
tx += (affinesprite) ? FixedDiv(offset2,FixedMul(xscale, this_scale)) : offset2;
tx += (affinesprite && (!splat)) ? FixedDiv(offset2,FixedMul(xscale, this_scale)) : offset2;
x2 = ((centerxfrac + FixedMul(tx,xscale))>>FRACBITS); x2--;
// off the left side