From a8136be74ba569147bfd179727ade7fb6e02f82e Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 5 Feb 2017 00:14:37 +1000 Subject: [PATCH] Adjust scaling of weapon's alpha value to work at much lower values --- qcsrc/common/wepent.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/wepent.qc b/qcsrc/common/wepent.qc index e244e7b7c..8d74a7b32 100644 --- a/qcsrc/common/wepent.qc +++ b/qcsrc/common/wepent.qc @@ -19,8 +19,8 @@ MACRO_END { (viewmodels[this.m_wepent_slot]).activeweapon = Weapons_from(ReadByte()); }) \ \ PROP(false, m_alpha, WEPENT_SET_NORMAL, \ - { WriteByte(chan, this.m_alpha * 16); }, \ - { (viewmodels[this.m_wepent_slot]).alpha = ReadByte() / 16; }) \ + { WriteByte(chan, rint(bound(-1, 254 * this.m_alpha, 254) - -1)); }, \ + { (viewmodels[this.m_wepent_slot]).alpha = (ReadByte() + -1) / 254; }) \ \ PROP(false, vortex_charge, WEPENT_SET_NORMAL, \ { WriteByte(chan, this.vortex_charge * 16); }, \ -- 2.39.2