From 075ac826fdda24898ae87e6cff7ef0ceec3965c1 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Thu, 17 Nov 2022 11:36:32 +0100 Subject: [PATCH] Adjust transition red to blue when fired --- qcsrc/common/weapons/weapon/vortex.qc | 10 +++++----- xonotic-common.cfg | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 5252ef984..98762a03e 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -22,12 +22,12 @@ METHOD(Vortex, wr_glow, vector(Vortex this, entity actor, entity wepent)) g.x = f * autocvar_g_weapon_charge_colormod_red_half; g.y = f * autocvar_g_weapon_charge_colormod_green_half; g.z = f * autocvar_g_weapon_charge_colormod_blue_half; - if (charge < animlimit) + if (charge > animlimit) { - 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; + f = autocvar_g_weapon_charge_colormod_hdrmultiplier * (charge - animlimit) / (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') diff --git a/xonotic-common.cfg b/xonotic-common.cfg index 651cd1503..96c7d83e6 100644 --- a/xonotic-common.cfg +++ b/xonotic-common.cfg @@ -128,9 +128,9 @@ set g_weapon_charge_colormod_hdrmultiplier 4 "how much to multiply the colors by set g_weapon_charge_colormod_red_half 0 set g_weapon_charge_colormod_green_half 0.5 set g_weapon_charge_colormod_blue_half 1 -set g_weapon_charge_colormod_red_full 1 -set g_weapon_charge_colormod_green_full -0.5 -set g_weapon_charge_colormod_blue_full -1 +set g_weapon_charge_colormod_red_full -1 +set g_weapon_charge_colormod_green_full 0.5 +set g_weapon_charge_colormod_blue_full 1 // session locking locksession 1 -- 2.39.2