@@ -8724,10 +8724,18 @@ void BuildBigHeadTransformations( CBaseAnimating *pObject, CStudioHdr *hdr, Vect
8724
8724
// Scale the head.
8725
8725
MatrixScaleBy ( flScale, transform );
8726
8726
8727
+ #ifdef BDSBASE
8728
+ const int cMaxNumHelms = 4 ;
8729
+ #else
8727
8730
const int cMaxNumHelms = 2 ;
8731
+ #endif
8728
8732
int iHelmIndex[cMaxNumHelms];
8729
8733
iHelmIndex[0 ] = pObject->LookupBone ( " prp_helmet" );
8730
8734
iHelmIndex[1 ] = pObject->LookupBone ( " prp_hat" );
8735
+ #ifdef BDSBASE
8736
+ iHelmIndex[2 ] = pObject->LookupBone (" prp_cig" );
8737
+ iHelmIndex[3 ] = pObject->LookupBone (" prp_glasses" );
8738
+ #endif
8731
8739
8732
8740
for ( int i = 0 ; i < cMaxNumHelms; i++ )
8733
8741
{
@@ -8774,6 +8782,22 @@ void BuildDecapitatedTransformations( CBaseAnimating *pObject, CStudioHdr *hdr,
8774
8782
matrix3x4_t &transformhelmet = pObject->GetBoneForWrite ( iHelm );
8775
8783
MatrixScaleByZero ( transformhelmet );
8776
8784
}
8785
+
8786
+ #ifdef BDSBASE
8787
+ iHelm = pObject->LookupBone (" prp_cig" );
8788
+ if (iHelm != -1 )
8789
+ {
8790
+ matrix3x4_t & transformhelmet = pObject->GetBoneForWrite (iHelm);
8791
+ MatrixScaleByZero (transformhelmet);
8792
+ }
8793
+
8794
+ iHelm = pObject->LookupBone (" prp_glasses" );
8795
+ if (iHelm != -1 )
8796
+ {
8797
+ matrix3x4_t & transformhelmet = pObject->GetBoneForWrite (iHelm);
8798
+ MatrixScaleByZero (transformhelmet);
8799
+ }
8800
+ #endif
8777
8801
}
8778
8802
8779
8803
@@ -8828,6 +8852,18 @@ void BuildNeckScaleTransformations(CBaseAnimating* pObject, CStudioHdr* hdr, Vec
8828
8852
}
8829
8853
}
8830
8854
8855
+ #ifdef BDSBASE
8856
+ if (iClass == TF_CLASS_MEDIC)
8857
+ {
8858
+ int iGlasses = pObject->LookupBone (" prp_glasses" );
8859
+ if (iGlasses != -1 )
8860
+ {
8861
+ matrix3x4_t & glasses_transform = pObject->GetBoneForWrite (iGlasses);
8862
+ MatrixScaleByZero (glasses_transform);
8863
+ }
8864
+ }
8865
+ #endif
8866
+
8831
8867
// Compress the head into the neck.
8832
8868
int iHead = pObject->LookupBone ( " bip_head" );
8833
8869
if ( iHead != -1 )
@@ -8885,7 +8921,11 @@ void AppendChildren_R( CUtlVector< const mstudiobone_t * > *pChildBones, const s
8885
8921
// -----------------------------------------------------------------------------
8886
8922
// Purpose:
8887
8923
// -----------------------------------------------------------------------------
8888
- void BuildTorsoScaleTransformations ( CBaseAnimating *pObject, CStudioHdr *hdr, Vector *pos, Quaternion q[], const matrix3x4_t & cameraTransform, int boneMask, CBoneBitList &boneComputed, float flScale, int iClass )
8924
+ #ifdef BDSBASE
8925
+ void BuildTorsoScaleTransformations (CBaseAnimating* pObject, CStudioHdr* hdr, Vector* pos, Quaternion q[], const matrix3x4_t & cameraTransform, int boneMask, CBoneBitList& boneComputed, float flScale)
8926
+ #else
8927
+ void BuildTorsoScaleTransformations (CBaseAnimating* pObject, CStudioHdr* hdr, Vector* pos, Quaternion q[], const matrix3x4_t & cameraTransform, int boneMask, CBoneBitList& boneComputed, float flScale, int iClass)
8928
+ #endif
8889
8929
{
8890
8930
if ( !pObject || flScale == 1 .f )
8891
8931
return ;
@@ -9108,7 +9148,11 @@ void C_TFPlayer::BuildTransformations( CStudioHdr *hdr, Vector *pos, Quaternion
9108
9148
m_BoneAccessor.SetWritableBones ( BONE_USED_BY_ANYTHING );
9109
9149
float flHeadScale = m_Shared.InCond ( TF_COND_HALLOWEEN_GHOST_MODE ) ? 1.5 : m_flHeadScale;
9110
9150
BuildBigHeadTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, flHeadScale );
9111
- BuildTorsoScaleTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale, GetPlayerClass ()->GetClassIndex () );
9151
+ #ifdef BDSBASE
9152
+ BuildTorsoScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale);
9153
+ #else
9154
+ BuildTorsoScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale, GetPlayerClass ()->GetClassIndex ());
9155
+ #endif
9112
9156
BuildHandScaleTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flHandScale );
9113
9157
#ifdef BDSBASE
9114
9158
BuildNeckScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flNeckScale);
@@ -9127,7 +9171,11 @@ void C_TFRagdoll::BuildTransformations( CStudioHdr *hdr, Vector *pos, Quaternion
9127
9171
9128
9172
m_BoneAccessor.SetWritableBones ( BONE_USED_BY_ANYTHING );
9129
9173
BuildBigHeadTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flHeadScale );
9130
- BuildTorsoScaleTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale, GetClass () );
9174
+ #ifdef BDSBASE
9175
+ BuildTorsoScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale);
9176
+ #else
9177
+ BuildTorsoScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flTorsoScale, GetClass ());
9178
+ #endif
9131
9179
BuildHandScaleTransformations ( this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flHandScale );
9132
9180
#ifdef BDSBASE
9133
9181
BuildNeckScaleTransformations (this , hdr, pos, q, cameraTransform, boneMask, boneComputed, m_flNeckScale);
0 commit comments