Quote:
Originally Posted by fbef0102
you are right, I have uploaded if someone could help me
|
Well, I tried to find it for you but unfortunately without any success, it's complicated in windows...
But after a long, I just noticed that the function you are looking for itself is easily reproducible, here's the code from SourceSDK 2013
Code:
bool PassServerEntityFilter( const IHandleEntity *pTouch, const IHandleEntity *pPass )
{
if ( !pPass )
return true;
if ( pTouch == pPass )
return false;
const CBaseEntity *pEntTouch = EntityFromEntityHandle( pTouch );
const CBaseEntity *pEntPass = EntityFromEntityHandle( pPass );
if ( !pEntTouch || !pEntPass )
return true;
// don't clip against own missiles
if ( pEntTouch->GetOwnerEntity() == pEntPass )
return false;
// don't clip against owner
if ( pEntPass->GetOwnerEntity() == pEntTouch )
return false;
return true;
}
Which is an easy check just using the "m_hOwnerEntity" sendprop:
SM equivalent:
PHP Code:
bool PassServerEntityFilter(int touchEnt, int passEnt)
{
if( passEnt == -1 )
{
return true;
}
if( passEnt == touchEnt )
{
return false;
}
int ownerEnt = GetEntPropEnt2(touchEnt, Prop_Send, "m_hOwnerEntity");
if( ownerEnt == passEnt )
{
return false;
}
ownerEnt = GetEntPropEnt2(passEnt, Prop_Send, "m_hOwnerEntity");
if( ownerEnt == touchEnt )
{
return false;
}
return true;
}