]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/wepent.qc
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / wepent.qc
index e244e7b7c9522b62848f3dc44e8567f82413a48b..43ca6e77ef03f8c77659d0d02bf20103ea15cab5 100644 (file)
@@ -19,13 +19,17 @@ 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); }, \
        { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 16; }) \
     \
+    PROP(false, okvortex_charge, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.okvortex_charge * 16); }, \
+       { (viewmodels[this.m_wepent_slot]).okvortex_charge = ReadByte() / 16; }) \
+    \
     PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
        { WriteByte(chan, this.m_gunalign); }, \
        { (viewmodels[this.m_wepent_slot]).m_gunalign = ReadByte(); }) \