From 354fbb2a85055eda22c088f99f14882cdcd07f59 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Tue, 24 Jan 2023 05:12:23 +0000 Subject: [PATCH] Make blob shadows respond to gamecode a bit more naturally. --- engine/client/cl_ents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index 6844a5db9..92bc63631 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -3231,7 +3231,7 @@ void CLQ1_AddShadow(entity_t *ent) scenetris_t *t; cl_adddecal_ctx_t ctx; - if (!r_blobshadows || !ent->model || (ent->model->type != mod_alias && ent->model->type != mod_halflife)) + if (!r_blobshadows || !ent->model || (ent->model->type != mod_alias && ent->model->type != mod_halflife) || (ent->flags & RF_NOSHADOW)) return; s = R_RegisterShader("shadowshader", SUF_NONE, @@ -3295,7 +3295,7 @@ void CLQ1_AddShadow(entity_t *ent) } ctx.t = t; - Vector4Set(ctx.rgbavalue, 0, 0, 0, r_blobshadows); + Vector4Set(ctx.rgbavalue, 0, 0, 0, r_blobshadows*((ent->flags & RF_TRANSLUCENT)?ent->shaderRGBAf[3]:1)); Mod_ClipDecal(cl.worldmodel, shadoworg, ctx.axis[0], ctx.axis[1], ctx.axis[2], radius, 0,0, CL_AddDecal_Callback, &ctx); if (!t->numidx) cl_numstris--;