From d5753bb15aab784ba66cb2ff904e63e8be4307fb Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 2 Jun 2024 11:38:40 +0200 Subject: [PATCH] smol fix and dont colormap software shadows either --- src/hardware/hw_main.c | 2 +- src/r_things.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 0177a655e..3ffb97faa 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3652,7 +3652,7 @@ static void HWR_DrawDropShadow(mobj_t *thing) floordiff = abs((flip < 0 ? thing->height : 0) + interp.z - groundz); - gpatch = W_CachePatchNum(sprites[SPR_THOK].spriteframes[0].lumppat[0], PU_CACHE); + gpatch = W_CachePatchNum(sprites[SPR_SHAD].spriteframes[0].lumppat[0], PU_CACHE); if (!(gpatch && gpatch->mipmap->format)) return; HWR_GetPatch(gpatch); diff --git a/src/r_things.c b/src/r_things.c index 14291a921..8615c972c 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1201,7 +1201,6 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t tx, fix vissprite_t *shadow; patch_t *patch; fixed_t xscale, yscale, shadowxscale, shadowyscale, shadowskew, x1, x2; - INT32 light = 0; fixed_t scalemul; fixed_t floordiff; fixed_t groundz; @@ -1227,7 +1226,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t tx, fix scalemul = FixedMul(FRACUNIT - floordiff/640, scale); - patch = W_CachePatchNum(sprites[SPR_THOK].spriteframes[0].lumppat[0], PU_CACHE); + patch = W_CachePatchNum(sprites[SPR_SHAD].spriteframes[0].lumppat[0], PU_CACHE); xscale = FixedDiv(projection, tz); yscale = FixedDiv(projectiony, tz); shadowxscale = FixedMul(thing->radius*2, scalemul); @@ -1303,25 +1302,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t tx, fix x1 += (x2-x1)/2; shadow->shear.offset = shadow->x1-x1; - if (thing->subsector->sector->numlights) - { - INT32 lightnum; - light = thing->subsector->sector->numlights - 1; - - // R_GetPlaneLight won't work on sloped lights! - for (lightnum = 1; lightnum < thing->subsector->sector->numlights; lightnum++) { - fixed_t h = P_GetLightZAt(&thing->subsector->sector->lightlist[lightnum], interp.x, interp.y); - if (h <= shadow->gzt) { - light = lightnum - 1; - break; - } - } - } - - if (thing->subsector->sector->numlights) - shadow->extra_colormap = thing->subsector->sector->lightlist[light].extra_colormap; - else - shadow->extra_colormap = thing->subsector->sector->extra_colormap; + shadow->extra_colormap = NULL; shadow->transmap = transtables + (tr_trans30<