Fix for when IKs aren't used.
This commit is contained in:
parent
db3027fa29
commit
b5e44d0ba6
2 changed files with 2 additions and 1 deletions
|
@ -480,6 +480,7 @@ void CBaseAnimatingOverlay::GetSkeleton( CStudioHdr *pStudioHdr, Vector pos[], Q
|
||||||
if ( m_pIk )
|
if ( m_pIk )
|
||||||
{
|
{
|
||||||
CIKContext auto_ik;
|
CIKContext auto_ik;
|
||||||
|
m_iIKCounter++;
|
||||||
auto_ik.Init( pStudioHdr, GetRenderAngles(), GetAbsOrigin(), gpGlobals->curtime, m_iIKCounter, boneMask );
|
auto_ik.Init( pStudioHdr, GetRenderAngles(), GetAbsOrigin(), gpGlobals->curtime, m_iIKCounter, boneMask );
|
||||||
boneSetup.CalcAutoplaySequences( pos, q, gpGlobals->curtime, &auto_ik );
|
boneSetup.CalcAutoplaySequences( pos, q, gpGlobals->curtime, &auto_ik );
|
||||||
}
|
}
|
||||||
|
|
|
@ -2011,7 +2011,7 @@ void CBaseAnimating::SetupBones( matrix3x4_t *pBoneToWorld, int boneMask )
|
||||||
Vector adjOrigin = GetAbsOrigin() + Vector( 0, 0, m_flEstIkOffset );
|
Vector adjOrigin = GetAbsOrigin() + Vector( 0, 0, m_flEstIkOffset );
|
||||||
|
|
||||||
// NOTE: For model scaling, we need to opt out of IK because it will mark the bones as already being calculated
|
// NOTE: For model scaling, we need to opt out of IK because it will mark the bones as already being calculated
|
||||||
if ( !IsModelScaled() )
|
if ( !IsModelScaled() && m_bUseIks )
|
||||||
{
|
{
|
||||||
// only allocate an ik block if the npc can use it
|
// only allocate an ik block if the npc can use it
|
||||||
if ( !m_pIk && pStudioHdr->numikchains() > 0 )
|
if ( !m_pIk && pStudioHdr->numikchains() > 0 )
|
||||||
|
|
Loading…
Reference in a new issue