File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -940,10 +940,13 @@ void CPhysHinge::Activate( void )
940
940
m_soundInfo.OnActivate (this );
941
941
if (m_pConstraint)
942
942
{
943
- m_soundInfo.StartThinking (this ,
944
- VelocitySampler::GetRelativeAngularVelocity (m_pConstraint->GetAttachedObject (), m_pConstraint->GetReferenceObject ()) ,
945
- m_hinge.worldAxisDirection
943
+ if (m_soundInfo.m_iszTravelSoundFwd != NULL_STRING || m_soundInfo.m_iszTravelSoundBack != NULL_STRING || m_soundInfo.m_pTravelSound != nullptr )
944
+ {
945
+ m_soundInfo.StartThinking (this ,
946
+ VelocitySampler::GetRelativeAngularVelocity (m_pConstraint->GetAttachedObject (), m_pConstraint->GetReferenceObject ()) ,
947
+ m_hinge.worldAxisDirection
946
948
);
949
+ }
947
950
948
951
SetThink (&CPhysHinge::SoundThink);
949
952
SetNextThink ( gpGlobals->curtime + m_soundInfo.getThinkRate () );
You can’t perform that action at this time.
0 commit comments