From e95139af94aee74dcf11e912bcfd55c2139d1058 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 9 Oct 2023 03:20:43 +0300 Subject: [PATCH] engine: client: avoid unneeded comparisons in CL_UpdateFlashlight --- engine/client/cl_tent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index fa0a0d79..9f2a7e49 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -2679,9 +2679,7 @@ void CL_UpdateFlashlight( cl_entity_t *ent ) falloff *= falloff; // apply brigthness to dlight - dl->color.r = bound( 0, falloff * 255, 255 ); - dl->color.g = bound( 0, falloff * 255, 255 ); - dl->color.b = bound( 0, falloff * 255, 255 ); + dl->color.r = dl->color.g = dl->color.b = bound( 0, falloff * 255, 255 ); dl->die = cl.time + 0.01f; // die on next frame dl->radius = 80; }