From cbd46261ac28ab681eb9e6b85ea894b05a02a7ea Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Thu, 17 Nov 2022 09:11:23 +0100 Subject: [PATCH] Apply transition between black (off / discharged), red (not charged) and blue (charged) --- qcsrc/common/weapons/weapon/vortex.qc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 5f3ddfa18..69007968d 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -24,10 +24,10 @@ METHOD(Vortex, wr_glow, vector(Vortex this, entity actor, entity wepent)) g.z = f * autocvar_g_weapon_charge_colormod_blue_half; if (charge < animlimit) { - f = autocvar_g_weapon_charge_colormod_hdrmultiplier * min(1, charge / animlimit); - g.x += f * autocvar_g_weapon_charge_colormod_red_full; - g.y += fabs(f * autocvar_g_weapon_charge_colormod_green_full); - g.z += fabs(f * autocvar_g_weapon_charge_colormod_blue_full); + f = autocvar_g_weapon_charge_colormod_hdrmultiplier * min(1, charge / animlimit) * charge / (1 - animlimit); + g.x += f * autocvar_g_weapon_charge_colormod_red_full; + g.y += f * autocvar_g_weapon_charge_colormod_green_full; + g.z += f * autocvar_g_weapon_charge_colormod_blue_full; } // transition color can't be '0 0 0' as it defaults to player model glow color if (g == '0 0 0') -- 2.39.2