Check for numbonecontrollers in setupbones

This commit is contained in:
Kamay Xutax 2024-08-27 21:57:07 +02:00
parent 658d9c1ade
commit 457fc82dc7
2 changed files with 10 additions and 7 deletions

View file

@ -486,8 +486,12 @@ void CBaseAnimatingOverlay::GetSkeleton( CStudioHdr *pStudioHdr, Vector pos[], Q
else
{
boneSetup.CalcAutoplaySequences( pos, q, gpGlobals->curtime, NULL );
}
if ( pStudioHdr->numbonecontrollers() )
{
boneSetup.CalcBoneAdj( pos, q, GetEncodedControllerArray() );
}
boneSetup.CalcBoneAdj( pos, q, GetEncodedControllerArray() );
}

View file

@ -1819,11 +1819,6 @@ void CBaseAnimating::SetupBones( matrix3x4_t *pBoneToWorld, int boneMask )
}
}
if ( m_pIk )
{
m_pIk->Init( pStudioHdr, GetAbsAngles(), GetAbsOrigin(), gpGlobals->curtime, m_iIKCounter, boneMask );
}
if ( m_pIk )
{
// FIXME: pass this into Studio_BuildMatrices to skip transforms
@ -2840,7 +2835,11 @@ void CBaseAnimating::GetSkeleton( CStudioHdr *pStudioHdr, Vector pos[], Quaterni
{
boneSetup.CalcAutoplaySequences( pos, q, gpGlobals->curtime, NULL );
}
boneSetup.CalcBoneAdj( pos, q, GetEncodedControllerArray() );
if ( pStudioHdr->numbonecontrollers() )
{
boneSetup.CalcBoneAdj( pos, q, GetEncodedControllerArray() );
}
}
int CBaseAnimating::DrawDebugTextOverlays(void)