Skip to content

Commit 776441e

Browse files
committed
fix bad default poseparams in CMDLPanel
1 parent b2705ba commit 776441e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vgui2/matsys_controls/mdlpanel.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,13 @@ void CMDLPanel::SetPoseParameters( const float *pPoseParameters, int nCount )
566566
else if ( m_RootMDL.m_MDL.GetMDL() != MDLHANDLE_INVALID )
567567
{
568568
CStudioHdr &studioHdr = *m_RootMDL.m_pStudioHdr;
569-
Studio_CalcDefaultPoseParameters( &studioHdr, m_PoseParameters, MAXSTUDIOPOSEPARAM );
569+
int nParameters = studioHdr.GetNumPoseParameters();
570+
for ( int iParam = 0; iParam < nParameters; ++iParam )
571+
{
572+
float ctlValue;
573+
Studio_SetPoseParameter( &studioHdr, iParam, 0.f, ctlValue );
574+
m_PoseParameters[ iParam ] = ctlValue;
575+
}
570576
}
571577
}
572578

0 commit comments

Comments
 (0)