From 9863967fdc2298b1cdb7676064b7b1f1ae8bbd2d Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Thu, 19 Sep 2024 20:10:06 +0200 Subject: [PATCH] strafehud: simplify color mixing function --- qcsrc/client/hud/panel/strafehud/util.qc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud/util.qc b/qcsrc/client/hud/panel/strafehud/util.qc index 189621c40..c15c99b19 100644 --- a/qcsrc/client/hud/panel/strafehud/util.qc +++ b/qcsrc/client/hud/panel/strafehud/util.qc @@ -298,11 +298,7 @@ bool StrafeHUD_DetermineJumpHeld(entity e, int keys, bool islocal) vector StrafeHUD_MixColors(vector color1, vector color2, float ratio) { - vector mixedColor; if(ratio <= 0) return color1; if(ratio >= 1) return color2; - mixedColor.x = color1.x + (color2.x - color1.x) * ratio; - mixedColor.y = color1.y + (color2.y - color1.y) * ratio; - mixedColor.z = color1.z + (color2.z - color1.z) * ratio; - return mixedColor; + return color1 + (color2 - color1) * ratio; } -- 2.39.2