X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fwepent.qc;h=8d74a7b3272ffc2da3ef3650fff42a223357cf16;hb=98b2c4213abe04f3ec96a95471ba5fe5fe57e008;hp=1b6e407786eca23a479b716e6597181702895199;hpb=ca9b32a13aaea249d3b5a90a10aaae170bf6aad5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/wepent.qc b/qcsrc/common/wepent.qc index 1b6e40778..8d74a7b32 100644 --- a/qcsrc/common/wepent.qc +++ b/qcsrc/common/wepent.qc @@ -4,12 +4,6 @@ var = x; \ MACRO_END -/** the engine player name strings are mutable! */ -#define WEPENT_SET_MUTABLE_STRING(var, x) MACRO_BEGIN \ - if (var) strunzone(var); \ - var = strzone(x); \ -MACRO_END - // #define PROP(public, fld, set, sv, cl) #define WEPENT_NETPROPS(PROP) PROP(false, sv_entnum, WEPENT_SET_NORMAL, {}, {}) /* sentinel */ \ PROP(false, m_switchweapon, WEPENT_SET_NORMAL, \ @@ -25,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); }, \