]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Free last available bitflag in the csqcmodel settings
authorterencehill <piuntn@gmail.com>
Mon, 15 Mar 2021 17:56:14 +0000 (18:56 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 15 Mar 2021 17:56:14 +0000 (18:56 +0100)
qcsrc/common/csqcmodel_settings.qh
qcsrc/lib/csqcmodel/cl_model.qc

index a65617b3c902282a600c27d040f9d8387dfd8169..adf9367ef7ee7baeae587d9a041269df482bb131 100644 (file)
@@ -41,6 +41,7 @@
 // add properties you want networked to CSQC here
 // NOTE: some properties share the same flag due to the limited number of bits (24) we can use
 //   generally the grouped ones are cheap (1 byte and less frequently networked)
+//   bits above 14 are defined in lib/csqcmodel/common.qh
 #define CSQCMODEL_EXTRAPROPERTIES \
        CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
        CSQCMODEL_PROPERTY(BIT(1), int, ReadInt24_t, WriteInt24_t, effects) \
                CSQCMODEL_PROPERTY(BIT(9), float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \
        CSQCMODEL_ENDIF \
        CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \
-       /*-- BIT(11) available --*/ \
+       CSQCMODEL_PROPERTY(BIT(11), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) /* NOTE: update the use of this in cl_model.qc if you change the bitflag number! */ \
        CSQCMODEL_PROPERTY(BIT(12), float, ReadCoord, WriteCoord, scale) \
        CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
-       CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) /* NOTE: update the use of this in cl_model.qc if you change the bitflag number! */ \
        /**/
-// NOTE: bits above 15 are defined in lib/csqcmodel/common.qh, avoid reusing them if possible
+// NOTE: bits above 14 are defined in lib/csqcmodel/common.qh, avoid reusing them if possible
 //   in particular bit 15 should NOT be reused, it is large enough sending the model's hitbox vectors!
 // TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody
 
index c4f6dbf0a5d896200d0f638592498d8d5d2518f6..b443ed3288fc31c4f4a0dc37df9708233ecb7f20 100644 (file)
@@ -279,7 +279,7 @@ NET_HANDLE(ENT_CLIENT_MODEL, bool isnew)
        if(sf & BIT(3))
                this.alpha = this.m_alpha;
 
-       if(sf & BIT(14))
+       if(sf & BIT(11))
                viewloc_SetTags(this);
 
        CSQCModel_InterpolateAnimation_Note(this, sf);