View Single Post
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 11-20-2019 , 13:46   Re: Signature Request Thread
Reply With Quote #340

Quote:
Originally Posted by fbef0102 View Post
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 touchEntint passEnt)
{

    if( 
passEnt == -)
    {
        return 
true;
    }

    if( 
passEnt == touchEnt )
    {
        return 
false;
    }

    
int ownerEnt GetEntPropEnt2(touchEntProp_Send"m_hOwnerEntity");

    if( 
ownerEnt == passEnt )
    {
        return 
false;
    }

    
ownerEnt GetEntPropEnt2(passEntProp_Send"m_hOwnerEntity");

    if( 
ownerEnt == touchEnt )
    {
        return 
false;
    }

    return 
true;


Last edited by TheDS1337; 11-21-2019 at 04:50.
TheDS1337 is offline