From 05f6b244f48f5a7cd8c1e0c5a82f655af045e4bb Mon Sep 17 00:00:00 2001 From: yumirak Date: Fri, 8 Mar 2024 12:19:24 +0700 Subject: [PATCH] cgame: drawpowerup now use fade range --- code/cgame/cg_ents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/cgame/cg_ents.c b/code/cgame/cg_ents.c index 9023c94f83..b03465ce64 100644 --- a/code/cgame/cg_ents.c +++ b/code/cgame/cg_ents.c @@ -551,12 +551,12 @@ static void CG_DrawPowerupAvailable (const centity_t *cent) shader = cg_items[es->modelindex].icon; break; } - alpha = Com_Clamp( 0, 1, cg_drawPowerupAvailableAlpha.value); + alpha = Com_Clamp( 0, 1, cg_drawPowerupAvailableAlpha.value) * 255; ent.customShader = shader; ent.shaderRGBA[0] = 255; ent.shaderRGBA[1] = 255; ent.shaderRGBA[2] = 255; - ent.shaderRGBA[3] = alpha * 255; + ent.shaderRGBA[3] *= alpha / 255.0f; ent.origin[2] += cg_drawPowerupAvailableOffset.value;