Reverting merge of 12684 (Just to be safe; it was only used for the beta railgun stuff, and it might be causing MIRVs to stick to their owner)

This commit is contained in:
squeek 2011-06-26 02:54:59 +00:00
parent f3b050dd21
commit 6dc13d4632
3 changed files with 4 additions and 11 deletions

View file

@ -388,12 +388,10 @@ int CCollisionEvent::ShouldCollide( IPhysicsObject *pObj0, IPhysicsObject *pObj1
if ( pEntity0->ForceVPhysicsCollide( pEntity1 ) || pEntity1->ForceVPhysicsCollide( pEntity0 ) )
return 1;
// Added FSOLID_COLLIDE_WITH_OWNER logic, as per http://developer.valvesoftware.com/wiki/Owner#Collisions_with_owner - AfterShock
if ( pEntity0->edict() && pEntity1->edict() )
{
// don't collide with your owner
if ( (!pEntity0->IsSolidFlagSet(FSOLID_COLLIDE_WITH_OWNER) && pEntity0->GetOwnerEntity() == pEntity1)
|| (!pEntity1->IsSolidFlagSet(FSOLID_COLLIDE_WITH_OWNER) && pEntity1->GetOwnerEntity() == pEntity0) )
if ( pEntity0->GetOwnerEntity() == pEntity1 || pEntity1->GetOwnerEntity() == pEntity0 )
return 0;
}

View file

@ -217,21 +217,17 @@ bool PassServerEntityFilter( const IHandleEntity *pTouch, const IHandleEntity *p
if ( !pEntTouch || !pEntPass )
return true;
// Tweaked 2 lines here to add FSOLID_COLLIDE_WITH_OWNER as per http://developer.valvesoftware.com/wiki/Owner#Collisions_with_owner - AfterShock
// don't clip against own missiles
if ( !pEntTouch->IsSolidFlagSet(FSOLID_COLLIDE_WITH_OWNER) && pEntTouch->GetOwnerEntity() == pEntPass )
if ( pEntTouch->GetOwnerEntity() == pEntPass )
return false;
// don't clip against owner
if(!pEntPass->CanClipOwnerEntity())
{
if ( !pEntPass->IsSolidFlagSet(FSOLID_COLLIDE_WITH_OWNER) && pEntPass->GetOwnerEntity() == pEntTouch )
if(pEntPass->GetOwnerEntity() == pEntTouch)
return false;
}
if(!pEntPass->CanClipPlayer() && pEntTouch->IsPlayer())
return false;

View file

@ -192,9 +192,8 @@ enum SolidFlags_t
FSOLID_FORCE_WORLD_ALIGNED = 0x0040, // Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS
FSOLID_USE_TRIGGER_BOUNDS = 0x0080, // Uses a special trigger bounds separate from the normal OBB
FSOLID_ROOT_PARENT_ALIGNED = 0x0100, // Collisions are defined in root parent's local coordinate space
FSOLID_COLLIDE_WITH_OWNER = 0X0400, // Can hit our m_hOwner
FSOLID_MAX_BITS = 10
FSOLID_MAX_BITS = 9
};
//-----------------------------------------------------------------------------