Lag compensate for friendly players even when friendly-fire is off. Mostly a precaution. Note that CFF_SV_Player implements its own WantsLagCompensationOnEntity.

See: https://github.com/ValveSoftware/source-sdk-2013/issues/201#issuecomment-29565874
This commit is contained in:
squeek 2013-12-03 04:24:17 +00:00
parent 6d0c20febc
commit 6c08c02252

View file

@ -735,8 +735,12 @@ int CBasePlayer::ShouldTransmit( const CCheckTransmitInfo *pInfo )
bool CBasePlayer::WantsLagCompensationOnEntity( const CBasePlayer *pPlayer, const CUserCmd *pCmd, const CBitVec<MAX_EDICTS> *pEntityTransmitBits ) const
{
// Team members shouldn't be adjusted unless friendly fire is on.
// FF --> Disagree
/*
if ( !friendlyfire.GetInt() && pPlayer->GetTeamNumber() == GetTeamNumber() )
return false;
*/
// FF <--
// If this entity hasn't been transmitted to us and acked, then don't bother lag compensating it.
if ( pEntityTransmitBits && !pEntityTransmitBits->Get( pPlayer->entindex() ) )