Skip to content

Commit

Permalink
Better timing for hassassin's footstep sound when she's walking
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Nov 21, 2024
1 parent f72f0ca commit 778d004
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dlls/hassassin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class CHAssassin : public CFollowingMonster
int m_iTargetRanderamt;

int m_iFrustration;
float m_nextWalkFootstep;

int m_iShell;

Expand Down Expand Up @@ -825,7 +826,7 @@ void CHAssassin::RunAI( void )
pev->rendermode = kRenderNormal;
}

if( m_Activity == ACT_RUN || m_Activity == ACT_WALK )
if( m_Activity == ACT_RUN )
{
static int iStep = 0;
iStep = !iStep;
Expand All @@ -834,6 +835,14 @@ void CHAssassin::RunAI( void )
EmitSoundScript(footstepSoundScript);
}
}
else if (m_Activity == ACT_WALK)
{
if (m_nextWalkFootstep <= gpGlobals->time)
{
EmitSoundScript(footstepSoundScript);
m_nextWalkFootstep = gpGlobals->time + 0.58f;
}
}
}

//=========================================================
Expand Down

0 comments on commit 778d004

Please sign in to comment.