// Token: 0x06000A24 RID: 2596 RVA: 0x0002C358 File Offset: 0x0002A558
        private bool CheckPositionFree(NodeGraph nodeGraph, NodeGraph.NodeIndex nodeIndex, SpawnCard spawnCard)
        {
            DirectorCore.NodeReference value = new DirectorCore.NodeReference(nodeGraph, nodeIndex);
            if (Array.IndexOf <DirectorCore.NodeReference>(this.occupiedNodes, value) != -1)
            {
                return(false);
            }
            float   num = HullDef.Find(spawnCard.hullSize).radius * 0.7f;
            Vector3 vector;

            nodeGraph.GetNodePosition(nodeIndex, out vector);
            if (spawnCard.nodeGraphType == MapNodeGroup.GraphType.Ground)
            {
                vector += Vector3.up * (num + 0.25f);
            }
            return(Physics.OverlapSphere(vector, num, LayerIndex.world.mask | LayerIndex.defaultLayer.mask | LayerIndex.fakeActor.mask).Length == 0);
        }
Beispiel #2
0
        // Token: 0x06000E7C RID: 3708 RVA: 0x00047510 File Offset: 0x00045710
        private bool CheckPositionFree(NodeGraph nodeGraph, NodeGraph.NodeIndex nodeIndex, SpawnCard spawnCard)
        {
            for (int i = 0; i < this.occupiedNodes.Length; i++)
            {
                if (this.occupiedNodes[i].nodeGraph == nodeGraph && this.occupiedNodes[i].nodeIndex == nodeIndex)
                {
                    return(false);
                }
            }
            float   num = HullDef.Find(spawnCard.hullSize).radius * 0.7f;
            Vector3 vector;

            nodeGraph.GetNodePosition(nodeIndex, out vector);
            if (spawnCard.nodeGraphType == MapNodeGroup.GraphType.Ground)
            {
                vector += Vector3.up * (num + 0.25f);
            }
            return(Physics.OverlapSphere(vector, num, LayerIndex.world.mask | LayerIndex.defaultLayer.mask | LayerIndex.fakeActor.mask).Length == 0);
        }