fix precip translucency in software renderer

precipmobjs always spawned with AST_COPY blendmode which failed the check, but they are supposed to be translucent when rain
restore the correct behaviour
This commit is contained in:
Alug committed 2025-09-17 04:24:59 +02:00
1 parent ec3a30cb37
commit 22893a1952
2 files changed
+7 -7

No files matched your search

+6 -6
View File
@@ -5072,12 +5072,6 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
return;
}
// uncapped/interpolation
interpmobjstate_t interp = {};
// do interpolation
R_InterpolatePrecipMobjState(thing, R_GetMobjTimeFrac((mobj_t*)thing), &interp);
// Visibility check by the blend mode.
if (thing->frame & FF_TRANSMASK)
{
@@ -5085,6 +5079,12 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
return;
}
// uncapped/interpolation
interpmobjstate_t interp = {};
// do interpolation
R_InterpolatePrecipMobjState(thing, R_GetMobjTimeFrac((mobj_t*)thing), &interp);
// transform the origin point
tr_x = FixedToFloat(interp.x);
tr_y = FixedToFloat(interp.y);
+1 -1
View File
@@ -2010,7 +2010,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
vis->patch = static_cast<patch_t*>(W_CachePatchNum(sprframe->lumppat[0], PU_SPRITE));
// specific translucency
if ((thing->blendmode != AST_COPY) && cv_translucency.value)
if (thing->frame & FF_TRANSMASK)
vis->transmap = R_GetTranslucencyTable((thing->frame & FF_TRANSMASK) >> FF_TRANSSHIFT);
else
vis->transmap = NULL;