public bool IsValid(SpawnSessionContext context)
    {
        if (SearchDistance <= 0)
        {
            return(true);
        }

        if (NoiseThreshold <= 0)
        {
            return(true);
        }

        List <ZDO> players = PlayerUtils.GetPlayerZdosInRadius(context.SpawnerZdo.GetPosition(), SearchDistance);

        foreach (var player in players)
        {
            if (player is null)
            {
                continue;
            }

            if (player.GetNoise() >= NoiseThreshold)
            {
                return(true);
            }
        }

        return(false);
    }
    public bool IsValid(SpawnSessionContext sessionContext)
    {
        var point         = sessionContext.SpawnerZdo.GetPosition();
        var nearbyPlayers = PlayerUtils.GetPlayerZdosInRadius(point, WithinDistance);

        if (nearbyPlayers.Count == 0)
        {
            return(false);
        }

        return(nearbyPlayers.Any(x => Vector3.Distance(x.GetPosition(), point) <= WithinDistance));
    }