OverLoaded Member Function Not Found
Im trying to give Npc AI to a half life mod and i ran into this error
1>.\hl2mp\hl2mp_player.cpp(626) : error C2511: 'bool CHL2MP_Player::WantsLagCompensationOnEntity(const CBasePlayer *,const CUserCmd *,const CBitVec<NUM_BITS> *) const' : overloaded member function not found in 'CHL2MP_Player'
and thats the culprit. any ideas any help is greatly appreciated
bool CHL2MP_Player::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) )
// If this entity hasn't been transmitted to us and acked, then don't bother lag compensating it.
if ( pEntityTransmitBits && !pEntityTransmitBits->Get( pPlayer->entindex() ) )
const Vector &vMyOrigin = GetAbsOrigin();
const Vector &vHisOrigin = pPlayer->GetAbsOrigin();
// get max distance player could have moved within max lag compensation time,
// multiply by 1.5 to to avoid "dead zones" (sqrt(2) would be the exact value)
float maxDistance = 1.5 * pPlayer->MaxSpeed() * sv_maxunlag.GetFloat();
// If the player is within this distance, lag compensate them in case they're running past us.
if ( vHisOrigin.DistTo( vMyOrigin ) < maxDistance )
// If their origin is not within a 45 degree cone in front of us, no need to lag compensate.
AngleVectors( pCmd->viewangles, &vForward );
Vector vDiff = vHisOrigin - vMyOrigin;
VectorNormalize( vDiff );
float flCosAngle = 0.707107f; // 45 degree angle
if ( vForward.Dot( vDiff ) < flCosAngle )