예제 #1
0
 public bool CheckPlacement(Deployable deployable, Ray ray, float fDistance)
 {
     using (TimeWarning.New("Deploy.CheckPlacement", 0.1f))
     {
         RaycastHit raycastHit;
         if (!Physics.Raycast(ray, ref raycastHit, fDistance, 1235288065))
         {
             return(false);
         }
         DeployVolume[] all              = PrefabAttribute.server.FindAll <DeployVolume>(deployable.prefabID);
         Vector3        point            = ((RaycastHit) ref raycastHit).get_point();
         Quaternion     deployedRotation = this.GetDeployedRotation(((RaycastHit) ref raycastHit).get_normal(), ((Ray) ref ray).get_direction());
         Quaternion     rotation         = deployedRotation;
         DeployVolume[] volumes          = all;
         if (DeployVolume.Check(point, rotation, volumes, -1))
         {
             return(false);
         }
         if (!this.IsPlacementAngleAcceptable(((RaycastHit) ref raycastHit).get_point(), deployedRotation))
         {
             return(false);
         }
     }
     return(true);
 }
예제 #2
0
    protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
    {
        bool flag;

        position = position + (rotation * this.bounds.center);
        OBB oBB = new OBB(position, this.bounds.size, rotation);
        List <BaseEntity> list = Pool.GetList <BaseEntity>();

        Vis.Entities <BaseEntity>(position, oBB.extents.magnitude, list, this.layers & mask, QueryTriggerInteraction.Collide);
        List <BaseEntity> .Enumerator enumerator = list.GetEnumerator();
        try
        {
            while (enumerator.MoveNext())
            {
                BaseEntity     current           = enumerator.Current;
                DeployVolume[] deployVolumeArray = PrefabAttribute.server.FindAll <DeployVolume>(current.prefabID);
                if (!DeployVolume.Check(current.transform.position, current.transform.rotation, deployVolumeArray, oBB, 1 << (this.layer & 31)))
                {
                    continue;
                }
                Pool.FreeList <BaseEntity>(ref list);
                flag = true;
                return(flag);
            }
            Pool.FreeList <BaseEntity>(ref list);
            return(false);
        }
        finally
        {
            ((IDisposable)enumerator).Dispose();
        }
        return(flag);
    }
예제 #3
0
    public bool CheckPlacement(Deployable deployable, Ray ray, float fDistance)
    {
        RaycastHit raycastHit;
        bool       flag;

        using (TimeWarning timeWarning = TimeWarning.New("Deploy.CheckPlacement", 0.1f))
        {
            if (UnityEngine.Physics.Raycast(ray, out raycastHit, fDistance, 1235288065))
            {
                DeployVolume[] deployVolumeArray = PrefabAttribute.server.FindAll <DeployVolume>(deployable.prefabID);
                Vector3        vector3           = raycastHit.point;
                Quaternion     deployedRotation  = this.GetDeployedRotation(raycastHit.normal, ray.direction);
                if (DeployVolume.Check(vector3, deployedRotation, deployVolumeArray, -1))
                {
                    flag = false;
                }
                else if (this.IsPlacementAngleAcceptable(raycastHit.point, deployedRotation))
                {
                    return(true);
                }
                else
                {
                    flag = false;
                }
            }
            else
            {
                flag = false;
            }
        }
        return(flag);
    }
예제 #4
0
 private object CanChangeGrade(BasePlayer player, BuildingBlock block, BuildingGrade.Enum iGrade)
 {
     if (DeployVolume.Check(block.transform.position, block.transform.rotation, PrefabAttribute.server.FindAll <DeployVolume>(block.prefabID), ~(1 << block.gameObject.layer)))
     {
         return(false);
     }
     return(null);
 }
예제 #5
0
 private static bool UpgradeBlocked(BuildingBlock block)
 {
     if (!block.blockDefinition.checkVolumeOnUpgrade)
     {
         return(false);
     }
     return(DeployVolume.Check(block.transform.position, block.transform.rotation, PrefabAttribute.server.FindAll <DeployVolume>(block.prefabID), ~(1 << block.gameObject.layer)));
 }
예제 #6
0
 private bool IsRotationBlocked()
 {
     if (!this.blockDefinition.checkVolumeOnRotate)
     {
         return(false);
     }
     return(DeployVolume.Check(((Component)this).get_transform().get_position(), ((Component)this).get_transform().get_rotation(), PrefabAttribute.server.FindAll <DeployVolume>(this.prefabID), ~(1 << ((Component)this).get_gameObject().get_layer())));
 }
예제 #7
0
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position = position + (rotation * ((this.worldRotation * this.center) + this.worldPosition));
     if (DeployVolume.CheckSphere(position, this.radius, this.layers & mask, this.ignore))
     {
         return(true);
     }
     return(false);
 }
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position = position + (rotation * ((this.worldRotation * this.center) + this.worldPosition));
     if (DeployVolume.CheckCapsule(position + ((((rotation * this.worldRotation) * Vector3.up) * this.height) * 0.5f), position + ((((rotation * this.worldRotation) * Vector3.down) * this.height) * 0.5f), this.radius, this.layers & mask, this.ignore))
     {
         return(true);
     }
     return(false);
 }
예제 #9
0
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position += rotation * (worldRotation * center + worldPosition);
     if (DeployVolume.CheckSphere(position, radius, (int)layers & mask, this))
     {
         return(true);
     }
     return(false);
 }
예제 #10
0
 private bool IsRotationBlocked()
 {
     if (!blockDefinition.checkVolumeOnRotate)
     {
         return(false);
     }
     DeployVolume[] volumes = PrefabAttribute.server.FindAll <DeployVolume>(prefabID);
     return(DeployVolume.Check(base.transform.position, base.transform.rotation, volumes, ~(1 << base.gameObject.layer)));
 }
예제 #11
0
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position += rotation * bounds.center;
     if (DeployVolume.CheckOBB(new OBB(position, bounds.size, rotation), (int)layers & mask, this))
     {
         return(true);
     }
     return(false);
 }
예제 #12
0
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position = position + (rotation * this.bounds.center);
     if (DeployVolume.CheckOBB(new OBB(position, this.bounds.size, rotation), this.layers & mask, this.ignore))
     {
         return(true);
     }
     return(false);
 }
 private bool IsUpgradeBlocked()
 {
     if (!this.blockDefinition.checkVolumeOnUpgrade)
     {
         return(false);
     }
     DeployVolume[] deployVolumeArray = PrefabAttribute.server.FindAll <DeployVolume>(this.prefabID);
     return(DeployVolume.Check(base.transform.position, base.transform.rotation, deployVolumeArray, ~(1 << (base.gameObject.layer & 31))));
 }
예제 #14
0
    public static bool CheckBounds(Bounds bounds, int layerMask, DeployVolume volume)
    {
        List <Collider> obj = Pool.GetList <Collider>();

        GamePhysics.OverlapBounds(bounds, obj, layerMask, QueryTriggerInteraction.Collide);
        bool result = CheckFlags(obj, volume);

        Pool.FreeList(ref obj);
        return(result);
    }
예제 #15
0
    public static bool CheckSphere(Vector3 pos, float radius, int layerMask, DeployVolume volume)
    {
        List <Collider> obj = Pool.GetList <Collider>();

        GamePhysics.OverlapSphere(pos, radius, obj, layerMask, QueryTriggerInteraction.Collide);
        bool result = CheckFlags(obj, volume);

        Pool.FreeList(ref obj);
        return(result);
    }
예제 #16
0
    protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
    {
        position += rotation * (worldRotation * center + worldPosition);
        Vector3 start = position + rotation * worldRotation * Vector3.up * height * 0.5f;
        Vector3 end   = position + rotation * worldRotation * Vector3.down * height * 0.5f;

        if (DeployVolume.CheckCapsule(start, end, radius, (int)layers & mask, this))
        {
            return(true);
        }
        return(false);
    }
예제 #17
0
    public static bool CheckCapsule(Vector3 start, Vector3 end, float radius, int layerMask, ColliderInfo.Flags ignore)
    {
        if ((int)ignore == 0)
        {
            return(GamePhysics.CheckCapsule(start, end, radius, layerMask, QueryTriggerInteraction.UseGlobal));
        }
        List <Collider> list = Pool.GetList <Collider>();

        GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, QueryTriggerInteraction.Ignore);
        bool flag = DeployVolume.CheckFlags(list, ignore);

        Pool.FreeList <Collider>(ref list);
        return(flag);
    }
예제 #18
0
    public static bool CheckOBB(OBB obb, int layerMask, ColliderInfo.Flags ignore)
    {
        if ((int)ignore == 0)
        {
            return(GamePhysics.CheckOBB(obb, layerMask, QueryTriggerInteraction.UseGlobal));
        }
        List <Collider> list = Pool.GetList <Collider>();

        GamePhysics.OverlapOBB(obb, list, layerMask, QueryTriggerInteraction.Ignore);
        bool flag = DeployVolume.CheckFlags(list, ignore);

        Pool.FreeList <Collider>(ref list);
        return(flag);
    }
예제 #19
0
    public static bool CheckOBB(OBB obb, int layerMask, ColliderInfo.Flags ignore)
    {
        if (ignore == (ColliderInfo.Flags) 0)
        {
            return(GamePhysics.CheckOBB(obb, layerMask, (QueryTriggerInteraction)0));
        }
        List <Collider> list = (List <Collider>)Pool.GetList <Collider>();

        GamePhysics.OverlapOBB(obb, list, layerMask, (QueryTriggerInteraction)1);
        int num = DeployVolume.CheckFlags(list, ignore) ? 1 : 0;

        // ISSUE: cast to a reference type
        Pool.FreeList <Collider>((List <M0>&) ref list);
        return(num != 0);
    }
예제 #20
0
 private static bool CheckFlags(List <Collider> list, DeployVolume volume)
 {
     for (int i = 0; i < list.Count; i++)
     {
         GameObject gameObject = list[i].gameObject;
         if (gameObject.CompareTag("DeployVolumeIgnore"))
         {
             continue;
         }
         ColliderInfo component = gameObject.GetComponent <ColliderInfo>();
         if (!(component == null) && volume.ignore != 0 && component.HasFlag(volume.ignore))
         {
             continue;
         }
         if (volume.entityList.Length == 0)
         {
             return(true);
         }
         BaseEntity baseEntity = GameObjectEx.ToBaseEntity(list[i]);
         bool       flag       = false;
         if (baseEntity != null)
         {
             BaseEntity[] array = volume.entityList;
             foreach (BaseEntity baseEntity2 in array)
             {
                 if (baseEntity.prefabID == baseEntity2.prefabID)
                 {
                     flag = true;
                     break;
                 }
             }
         }
         if (volume.entityMode == EntityMode.IncludeList)
         {
             if (flag)
             {
                 return(true);
             }
         }
         else if (volume.entityMode == EntityMode.ExcludeList && !flag)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #21
0
    protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
    {
        position += rotation * bounds.center;
        OBB test = new OBB(position, bounds.size, rotation);
        List <BaseEntity> obj = Pool.GetList <BaseEntity>();

        Vis.Entities(position, test.extents.magnitude, obj, (int)layers & mask);
        foreach (BaseEntity item in obj)
        {
            DeployVolume[] volumes = PrefabAttribute.server.FindAll <DeployVolume>(item.prefabID);
            if (DeployVolume.Check(item.transform.position, item.transform.rotation, volumes, test, 1 << layer))
            {
                Pool.FreeList(ref obj);
                return(true);
            }
        }
        Pool.FreeList(ref obj);
        return(false);
    }
예제 #22
0
    public static bool CheckCapsule(
        Vector3 start,
        Vector3 end,
        float radius,
        int layerMask,
        ColliderInfo.Flags ignore)
    {
        if (ignore == (ColliderInfo.Flags) 0)
        {
            return(GamePhysics.CheckCapsule(start, end, radius, layerMask, (QueryTriggerInteraction)0));
        }
        List <Collider> list = (List <Collider>)Pool.GetList <Collider>();

        GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, (QueryTriggerInteraction)1);
        int num = DeployVolume.CheckFlags(list, ignore) ? 1 : 0;

        // ISSUE: cast to a reference type
        Pool.FreeList <Collider>((List <M0>&) ref list);
        return(num != 0);
    }
예제 #23
0
 public bool CheckPlacement(Deployable deployable, Ray ray, float fDistance)
 {
     using (TimeWarning.New("Deploy.CheckPlacement"))
     {
         RaycastHit hitInfo;
         if (!UnityEngine.Physics.Raycast(ray, out hitInfo, fDistance, 1235288065))
         {
             return(false);
         }
         DeployVolume[] volumes          = PrefabAttribute.server.FindAll <DeployVolume>(deployable.prefabID);
         Vector3        point            = hitInfo.point;
         Quaternion     deployedRotation = GetDeployedRotation(hitInfo.normal, ray.direction);
         if (DeployVolume.Check(point, deployedRotation, volumes))
         {
             return(false);
         }
         if (!IsPlacementAngleAcceptable(hitInfo.point, deployedRotation))
         {
             return(false);
         }
     }
     return(true);
 }
    protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
    {
        position = Vector3.op_Addition(position, Quaternion.op_Multiply(rotation, ((Bounds) ref this.bounds).get_center()));
        OBB test;

        ((OBB) ref test).\u002Ector(position, ((Bounds) ref this.bounds).get_size(), rotation);
        List <BaseEntity> list = (List <BaseEntity>)Pool.GetList <BaseEntity>();

        Vis.Entities <BaseEntity>(position, ((Vector3) ref test.extents).get_magnitude(), list, LayerMask.op_Implicit(this.layers) & mask, (QueryTriggerInteraction)2);
        foreach (BaseEntity baseEntity in list)
        {
            DeployVolume[] all = PrefabAttribute.server.FindAll <DeployVolume>(baseEntity.prefabID);
            if (DeployVolume.Check(((Component)baseEntity).get_transform().get_position(), ((Component)baseEntity).get_transform().get_rotation(), all, test, 1 << this.layer))
            {
                // ISSUE: cast to a reference type
                Pool.FreeList <BaseEntity>((List <M0>&) ref list);
                return(true);
            }
        }
        // ISSUE: cast to a reference type
        Pool.FreeList <BaseEntity>((List <M0>&) ref list);
        return(false);
    }
예제 #25
0
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position = Vector3.op_Addition(position, Quaternion.op_Multiply(rotation, Vector3.op_Addition(Quaternion.op_Multiply(this.worldRotation, this.center), this.worldPosition)));
     return(DeployVolume.CheckSphere(position, this.radius, LayerMask.op_Implicit(this.layers) & mask, this.ignore));
 }
예제 #26
0
    public bool UpdatePlacement(Transform transform, Construction common, ref Construction.Target target)
    {
        bool flag;

        if (!target.valid)
        {
            return(false);
        }
        if (!common.canBypassBuildingPermission && !target.player.CanBuild())
        {
            Construction.lastPlacementError = "Player doesn't have permission";
            return(false);
        }
        List <Socket_Base> list = Pool.GetList <Socket_Base>();

        common.FindMaleSockets(target, list);
        List <Socket_Base> .Enumerator enumerator = list.GetEnumerator();
        try
        {
            while (enumerator.MoveNext())
            {
                Socket_Base            current   = enumerator.Current;
                Construction.Placement placement = null;
                if (target.entity != null && target.socket != null && target.entity.IsOccupied(target.socket))
                {
                    continue;
                }
                if (placement == null)
                {
                    placement = current.DoPlacement(target);
                }
                if (placement == null)
                {
                    continue;
                }
                if (!current.CheckSocketMods(placement))
                {
                    transform.position = placement.position;
                    transform.rotation = placement.rotation;
                }
                else if (!this.TestPlacingThroughRock(ref placement, target))
                {
                    transform.position = placement.position;
                    transform.rotation = placement.rotation;
                    Construction.lastPlacementError = "Placing through rock";
                }
                else if (!Construction.TestPlacingThroughWall(ref placement, transform, common, target))
                {
                    transform.position = placement.position;
                    transform.rotation = placement.rotation;
                    Construction.lastPlacementError = "Placing through wall";
                }
                else if (Vector3.Distance(placement.position, target.player.eyes.position) <= common.maxplaceDistance + 1f)
                {
                    DeployVolume[] deployVolumeArray = PrefabAttribute.server.FindAll <DeployVolume>(this.prefabID);
                    if (DeployVolume.Check(placement.position, placement.rotation, deployVolumeArray, -1))
                    {
                        transform.position = placement.position;
                        transform.rotation = placement.rotation;
                        Construction.lastPlacementError = "Not enough space";
                    }
                    else if (BuildingProximity.Check(target.player, this, placement.position, placement.rotation))
                    {
                        transform.position = placement.position;
                        transform.rotation = placement.rotation;
                    }
                    else if (!common.isBuildingPrivilege || target.player.CanPlaceBuildingPrivilege(placement.position, placement.rotation, common.bounds))
                    {
                        bool flag1 = target.player.IsBuildingBlocked(placement.position, placement.rotation, common.bounds);
                        if (common.canBypassBuildingPermission || !flag1)
                        {
                            target.inBuildingPrivilege = flag1;
                            transform.position         = placement.position;
                            transform.rotation         = placement.rotation;
                            Pool.FreeList <Socket_Base>(ref list);
                            flag = true;
                            return(flag);
                        }
                        else
                        {
                            transform.position = placement.position;
                            transform.rotation = placement.rotation;
                            Construction.lastPlacementError = "Building privilege";
                        }
                    }
                    else
                    {
                        transform.position = placement.position;
                        transform.rotation = placement.rotation;
                        Construction.lastPlacementError = "Cannot stack building privileges";
                    }
                }
                else
                {
                    transform.position = placement.position;
                    transform.rotation = placement.rotation;
                    Construction.lastPlacementError = "Too far away";
                }
            }
            Pool.FreeList <Socket_Base>(ref list);
            return(false);
        }
        finally
        {
            ((IDisposable)enumerator).Dispose();
        }
        return(flag);
    }
예제 #27
0
    public bool UpdatePlacement(Transform transform, Construction common, ref Target target)
    {
        if (!target.valid)
        {
            return(false);
        }
        if (!common.canBypassBuildingPermission && !target.player.CanBuild())
        {
            lastPlacementError = "You don't have permission to build here";
            return(false);
        }
        List <Socket_Base> obj = Pool.GetList <Socket_Base>();

        common.FindMaleSockets(target, obj);
        foreach (Socket_Base item in obj)
        {
            Placement placement = null;
            if (target.entity != null && target.socket != null && target.entity.IsOccupied(target.socket))
            {
                continue;
            }
            if (placement == null)
            {
                placement = item.DoPlacement(target);
            }
            if (placement == null)
            {
                continue;
            }
            if (!item.CheckSocketMods(placement))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                continue;
            }
            if (!TestPlacingThroughRock(ref placement, target))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Placing through rock";
                continue;
            }
            if (!TestPlacingThroughWall(ref placement, transform, common, target))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Placing through wall";
                continue;
            }
            if (!TestPlacingCloseToRoad(ref placement, target))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Placing too close to road";
                continue;
            }
            if (Vector3.Distance(placement.position, target.player.eyes.position) > common.maxplaceDistance + 1f)
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Too far away";
                continue;
            }
            DeployVolume[] volumes = PrefabAttribute.server.FindAll <DeployVolume>(prefabID);
            if (DeployVolume.Check(placement.position, placement.rotation, volumes))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Not enough space";
                continue;
            }
            if (BuildingProximity.Check(target.player, this, placement.position, placement.rotation))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Too close to another building";
                continue;
            }
            if (common.isBuildingPrivilege && !target.player.CanPlaceBuildingPrivilege(placement.position, placement.rotation, common.bounds))
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "Cannot stack building privileges";
                continue;
            }
            bool flag = target.player.IsBuildingBlocked(placement.position, placement.rotation, common.bounds);
            if (!common.canBypassBuildingPermission && flag)
            {
                transform.position = placement.position;
                transform.rotation = placement.rotation;
                lastPlacementError = "You don't have permission to build here";
                continue;
            }
            target.inBuildingPrivilege = flag;
            transform.SetPositionAndRotation(placement.position, placement.rotation);
            Pool.FreeList(ref obj);
            return(true);
        }
        Pool.FreeList(ref obj);
        return(false);
    }
예제 #28
0
    public bool UpdatePlacement(
        Transform transform,
        Construction common,
        ref Construction.Target target)
    {
        if (!target.valid)
        {
            return(false);
        }
        if (!common.canBypassBuildingPermission && !target.player.CanBuild())
        {
            Construction.lastPlacementError = "Player doesn't have permission";
            return(false);
        }
        List <Socket_Base> list = (List <Socket_Base>)Pool.GetList <Socket_Base>();

        common.FindMaleSockets(target, list);
        foreach (Socket_Base socketBase in list)
        {
            Construction.Placement placement = (Construction.Placement)null;
            if (!Object.op_Inequality((Object)target.entity, (Object)null) || !((PrefabAttribute)target.socket != (PrefabAttribute)null) || !target.entity.IsOccupied(target.socket))
            {
                if (placement == null)
                {
                    placement = socketBase.DoPlacement(target);
                }
                if (placement != null)
                {
                    if (!socketBase.CheckSocketMods(placement))
                    {
                        transform.set_position(placement.position);
                        transform.set_rotation(placement.rotation);
                    }
                    else if (!this.TestPlacingThroughRock(ref placement, target))
                    {
                        transform.set_position(placement.position);
                        transform.set_rotation(placement.rotation);
                        Construction.lastPlacementError = "Placing through rock";
                    }
                    else if (!Construction.TestPlacingThroughWall(ref placement, transform, common, target))
                    {
                        transform.set_position(placement.position);
                        transform.set_rotation(placement.rotation);
                        Construction.lastPlacementError = "Placing through wall";
                    }
                    else if ((double)Vector3.Distance(placement.position, target.player.eyes.position) > (double)common.maxplaceDistance + 1.0)
                    {
                        transform.set_position(placement.position);
                        transform.set_rotation(placement.rotation);
                        Construction.lastPlacementError = "Too far away";
                    }
                    else
                    {
                        DeployVolume[] all = PrefabAttribute.server.FindAll <DeployVolume>(this.prefabID);
                        if (DeployVolume.Check(placement.position, placement.rotation, all, -1))
                        {
                            transform.set_position(placement.position);
                            transform.set_rotation(placement.rotation);
                            Construction.lastPlacementError = "Not enough space";
                        }
                        else if (BuildingProximity.Check(target.player, this, placement.position, placement.rotation))
                        {
                            transform.set_position(placement.position);
                            transform.set_rotation(placement.rotation);
                        }
                        else if (common.isBuildingPrivilege && !target.player.CanPlaceBuildingPrivilege(placement.position, placement.rotation, common.bounds))
                        {
                            transform.set_position(placement.position);
                            transform.set_rotation(placement.rotation);
                            Construction.lastPlacementError = "Cannot stack building privileges";
                        }
                        else
                        {
                            bool flag = target.player.IsBuildingBlocked(placement.position, placement.rotation, common.bounds);
                            if (!common.canBypassBuildingPermission && flag)
                            {
                                transform.set_position(placement.position);
                                transform.set_rotation(placement.rotation);
                                Construction.lastPlacementError = "Building privilege";
                            }
                            else
                            {
                                target.inBuildingPrivilege = flag;
                                transform.set_position(placement.position);
                                transform.set_rotation(placement.rotation);
                                // ISSUE: cast to a reference type
                                Pool.FreeList <Socket_Base>((List <M0>&) ref list);
                                return(true);
                            }
                        }
                    }
                }
            }
        }
        // ISSUE: cast to a reference type
        Pool.FreeList <Socket_Base>((List <M0>&) ref list);
        return(false);
    }
 protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1)
 {
     position = Vector3.op_Addition(position, Quaternion.op_Multiply(rotation, Vector3.op_Addition(Quaternion.op_Multiply(this.worldRotation, this.center), this.worldPosition)));
     return(DeployVolume.CheckCapsule(Vector3.op_Addition(position, Vector3.op_Multiply(Vector3.op_Multiply(Quaternion.op_Multiply(Quaternion.op_Multiply(rotation, this.worldRotation), Vector3.get_up()), this.height), 0.5f)), Vector3.op_Addition(position, Vector3.op_Multiply(Vector3.op_Multiply(Quaternion.op_Multiply(Quaternion.op_Multiply(rotation, this.worldRotation), Vector3.get_down()), this.height), 0.5f)), this.radius, LayerMask.op_Implicit(this.layers) & mask, this.ignore));
 }