Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/game/client/tf/vgui/tf_playermodelpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

DECLARE_BUILD_FACTORY( CTFPlayerModelPanel );

#define SCENE_LERP_TIME 0.1f

char g_szSceneTmpName[256];

static bool IsTauntItem( GameItemDefinition_t *pItemDef, const int iTeam, const int iClass, const char **ppSequence = NULL, const char **ppRequiredItem = NULL, const char **ppScene = NULL )
Expand Down Expand Up @@ -466,7 +468,7 @@ CChoreoScene *LoadSceneForModel( const char *filename, IChoreoEventCallback *pCa

if ( bSetEndTime )
{
*flSceneEndTime += 0.1f; // give time for lerp to idle pose
*flSceneEndTime += SCENE_LERP_TIME; // give time for lerp to idle pose
}
}

Expand Down Expand Up @@ -2291,10 +2293,11 @@ void CTFPlayerModelPanel::SetupFlexWeights( void )
// Advance time
if ( m_flLastTickTime < FLT_EPSILON )
{
m_flLastTickTime = m_RootMDL.m_MDL.m_flTime - 0.1;
m_flLastTickTime = m_RootMDL.m_MDL.m_flTime - SCENE_LERP_TIME;
}

m_flSceneTime += (m_RootMDL.m_MDL.m_flTime - m_flLastTickTime);
m_flSceneTime = Max( m_flSceneTime, -SCENE_LERP_TIME );
m_flLastTickTime = m_RootMDL.m_MDL.m_flTime;

if ( m_flSceneEndTime > FLT_EPSILON && m_flSceneTime > m_flSceneEndTime )
Expand Down