Ported some minor fixes from the Alien Swarm SDK

This commit is contained in:
Blixibon
2021-10-10 19:41:42 -05:00
parent 525e3214f2
commit 138d6c52aa
2 changed files with 35 additions and 21 deletions

View File

@@ -835,7 +835,11 @@ void CAI_BaseActor::UpdateLatchedValues( )
// set head latch
m_fLatchedPositions |= HUMANOID_LATCHED_HEAD;
#ifdef MAPBASE // From Alien Swarm SDK
if ( CanSkipAnimation() || !GetAttachment( "eyes", m_latchedEyeOrigin, &m_latchedHeadDirection ))
#else
if (!HasCondition( COND_IN_PVS ) || !GetAttachment( "eyes", m_latchedEyeOrigin, &m_latchedHeadDirection ))
#endif
{
m_latchedEyeOrigin = BaseClass::EyePosition( );
AngleVectors( GetLocalAngles(), &m_latchedHeadDirection );
@@ -1626,7 +1630,11 @@ void CAI_BaseActor::MaintainLookTargets( float flInterval )
}
// don't bother with any of the rest if the player can't see you
#ifdef MAPBASE // From Alien Swarm SDK
if ( CanSkipAnimation() )
#else
if (!HasCondition( COND_IN_PVS ))
#endif
{
return;
}