From: terencehill Date: Mon, 15 Mar 2021 17:56:14 +0000 (+0100) Subject: Free last available bitflag in the csqcmodel settings X-Git-Tag: xonotic-v0.8.5~505^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ad815aca304b14c92a59a5e6aa7a2f5076a6a07;p=xonotic%2Fxonotic-data.pk3dir.git Free last available bitflag in the csqcmodel settings --- diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index a65617b3c..adf9367ef 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -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) \ @@ -76,12 +77,11 @@ 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 diff --git a/qcsrc/lib/csqcmodel/cl_model.qc b/qcsrc/lib/csqcmodel/cl_model.qc index c4f6dbf0a..b443ed328 100644 --- a/qcsrc/lib/csqcmodel/cl_model.qc +++ b/qcsrc/lib/csqcmodel/cl_model.qc @@ -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);