Doors no longer have murderous intent (#4799)

This commit is contained in:
moonheart08
2021-10-08 02:37:17 -05:00
committed by GitHub
parent 14f11977c7
commit b9329d59b8

View File

@@ -446,7 +446,8 @@ namespace Content.Server.Doors.Components
// Use this version so we can ignore the CanCollide being false
foreach(var e in broadPhaseSystem.GetCollidingEntities(physicsComponent.Owner.Transform.MapID, physicsComponent.GetWorldAABB()))
{
if ((physicsComponent.CollisionMask & e.CollisionLayer) != 0 && broadPhaseSystem.IntersectionPercent(physicsComponent, e) > 0.01f) return true;
if (((physicsComponent.CollisionMask & e.CollisionLayer) | (e.CollisionMask & physicsComponent.CollisionLayer)) != 0
&& broadPhaseSystem.IntersectionPercent(physicsComponent, e) > 0.01f) return true;
}
}
return false;