X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fwepent.qc;h=8d74a7b3272ffc2da3ef3650fff42a223357cf16;hb=98b2c4213abe04f3ec96a95471ba5fe5fe57e008;hp=e244e7b7c9522b62848f3dc44e8567f82413a48b;hpb=36ba1021949ebd475e0561237a17ecf9fb93ced8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/wepent.qc b/qcsrc/common/wepent.qc index e244e7b7c9..8d74a7b327 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); }, \