Wanted to share a fix that gave some performance improvements in the
latest Dod Source release.


bool CDODPlayer::WantsLagCompensationOnEntity( const CBasePlayer
*pPlayer, const CUserCmd *pCmd, const CBitVec<MAX_EDICTS>
*pEntityTransmitBits ) const
{
        // No need to lag compensate at all if we're not attacking in
this command and
        // we haven't attacked recently.
        if ( !( pCmd->buttons & IN_ATTACK ) && (pCmd->command_number -
m_iLastWeaponFireUsercmd > 5) )
                return false;

        return BaseClass::WantsLagCompensationOnEntity( pPlayer, pCmd,
pEntityTransmitBits );
}


Add this to your player class, it will inherit from
CBasePlayer::WantsLagCompensation.

What this is doing it only performing lag compensation calculations in
the frames where a player is shooting or has just shot, as opposed to
every frame.

I'll try to get this into the next sdk code dump as well as some further
lag compensation changes that will fix players getting stuck in each
other.

Matt


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to