Aka_s_Vayne.Logic.VHRevolution.IsBothNearWall C# (CSharp) Method

IsBothNearWall() private static method

private static IsBothNearWall ( Obj_AI_Base target ) : bool
target Obj_AI_Base
return bool
        private static bool IsBothNearWall(Obj_AI_Base target)
        {
            var positions =
                GetWallQPositions(target, 110).ToList().OrderBy(pos => pos.Distance(target.ServerPosition, true));
            var positions_ex =
            GetWallQPositions(Variables._Player, 110).ToList().OrderBy(pos => pos.Distance(Variables._Player.ServerPosition, true));

            if (positions.Any(p => NavMesh.GetCollisionFlags(p).HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(p).HasFlag(CollisionFlags.Building)) && positions_ex.Any(p => NavMesh.GetCollisionFlags(p).HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(p).HasFlag(CollisionFlags.Building)))
            {
                return true;
            }
            return false;
        }