Ejemplo n.º 1
0
            public bool MoveNext()
            {
Label0:
                while (this.inInstanceEnumerator)
                {
                    if ((this._immediate || this.output) && this.overlapEnumerator.MoveNext())
                    {
                        MeshBatchInstance current = this.overlapEnumerator.Current;
                        if (this.IN.SurfaceForMeshBatchInstance(current, ref this.current))
                        {
                            return(true);
                        }
                    }
                    else
                    {
                        this.overlapEnumerator.Dispose();
                        this.overlapEnumerator    = null;
                        this.inInstanceEnumerator = false;
                        this.output = null;
                    }
                }
                ExplosionHelper.Point.Enumerator enumerator = this;
                int num  = enumerator.colliderIndex;
                int num1 = num;

                enumerator.colliderIndex = num + 1;
                if (num1 == -1)
                {
                    Vector3 n      = this.IN.point;
                    float   single = this.IN.blastRadius;
                    ExplosionHelper.Point points = this.IN;
                    this.overlap = Physics.OverlapSphere(n, single, points.overlapLayerMask);
                }
                while (this.colliderIndex < (int)this.overlap.Length)
                {
                    if (this._immediate || this.overlap[this.colliderIndex])
                    {
                        if (this.overlap[this.colliderIndex].GetMeshBatchPhysicalOutput <Facepunch.MeshBatch.MeshBatchPhysicalOutput>(out this.output))
                        {
                            this.inInstanceEnumerator = true;
                            Facepunch.MeshBatch.MeshBatchPhysicalOutput meshBatchPhysicalOutput = this.output;
                            Vector3 vector3          = this.IN.point;
                            ExplosionHelper.Point n1 = this.IN;
                            this.overlapEnumerator = meshBatchPhysicalOutput.EnumerateOverlapSphereInstances(vector3, n1.blastRadius).GetEnumerator();
                            goto Label0;
                        }
                        else if (this.IN.SurfaceForCollider(this.overlap[this.colliderIndex], ref this.current))
                        {
                            return(true);
                        }
                    }
                    ExplosionHelper.Point.Enumerator enumerator1 = this;
                    enumerator1.colliderIndex = enumerator1.colliderIndex + 1;
                }
                this.colliderIndex = (int)this.overlap.Length;
                this.current       = new ExplosionHelper.Surface();
                return(false);
            }
            // Token: 0x06002E6B RID: 11883 RVA: 0x000B25F8 File Offset: 0x000B07F8
            public bool MoveNext()
            {
                for (;;)
                {
IL_00:
                    while (this.inInstanceEnumerator)
                    {
                        if ((this._immediate || this.output) && this.overlapEnumerator.MoveNext())
                        {
                            MeshBatchInstance instance = this.overlapEnumerator.Current;
                            if (this.IN.SurfaceForMeshBatchInstance(instance, ref this.current))
                            {
                                return(true);
                            }
                        }
                        else
                        {
                            this.overlapEnumerator.Dispose();
                            this.overlapEnumerator    = null;
                            this.inInstanceEnumerator = false;
                            this.output = null;
                        }
                    }
                    if (this.colliderIndex++ == -1)
                    {
                        this.overlap = Physics.OverlapSphere(this.IN.point, this.IN.blastRadius, this.IN.overlapLayerMask);
                    }
                    while (this.colliderIndex < this.overlap.Length)
                    {
                        if (this._immediate || this.overlap[this.colliderIndex])
                        {
                            if (MeshBatchExtenders.GetMeshBatchPhysicalOutput <Facepunch.MeshBatch.MeshBatchPhysicalOutput>(this.overlap[this.colliderIndex], ref this.output))
                            {
                                this.inInstanceEnumerator = true;
                                this.overlapEnumerator    = this.output.EnumerateOverlapSphereInstances(this.IN.point, this.IN.blastRadius).GetEnumerator();
                                goto IL_00;
                            }
                            if (this.IN.SurfaceForCollider(this.overlap[this.colliderIndex], ref this.current))
                            {
                                return(true);
                            }
                        }
                        this.colliderIndex++;
                    }
                    goto Block_8;
                }
                return(true);

Block_8:
                this.colliderIndex = this.overlap.Length;
                this.current       = default(global::ExplosionHelper.Surface);
                return(false);
            }
Ejemplo n.º 3
0
 public bool MoveNext()
 {
     Label_007D:
     while (this.inInstanceEnumerator)
     {
         if ((this._immediate || (this.output != null)) && this.overlapEnumerator.MoveNext())
         {
             MeshBatchInstance current = this.overlapEnumerator.Current;
             if (this.IN.SurfaceForMeshBatchInstance(current, ref this.current))
             {
                 return true;
             }
         }
         else
         {
             this.overlapEnumerator.Dispose();
             this.overlapEnumerator = null;
             this.inInstanceEnumerator = false;
             this.output = null;
         }
     }
     if (this.colliderIndex++ == -1)
     {
         this.overlap = Physics.OverlapSphere(this.IN.point, this.IN.blastRadius, this.IN.overlapLayerMask);
     }
     while (this.colliderIndex < this.overlap.Length)
     {
         if (this._immediate || (this.overlap[this.colliderIndex] != null))
         {
             if (this.overlap[this.colliderIndex].GetMeshBatchPhysicalOutput<MeshBatchPhysicalOutput>(out this.output))
             {
                 this.inInstanceEnumerator = true;
                 this.overlapEnumerator = this.output.EnumerateOverlapSphereInstances(this.IN.point, this.IN.blastRadius).GetEnumerator();
                 goto Label_007D;
             }
             if (this.IN.SurfaceForCollider(this.overlap[this.colliderIndex], ref this.current))
             {
                 return true;
             }
         }
         this.colliderIndex++;
     }
     this.colliderIndex = this.overlap.Length;
     this.current = new ExplosionHelper.Surface();
     return false;
 }
 // Token: 0x06002E64 RID: 11876 RVA: 0x000B22F4 File Offset: 0x000B04F4
 private bool SurfaceForMeshBatchInstance(MeshBatchInstance instance, ref global::ExplosionHelper.Surface surface)
 {
     surface.idBase = instance;
     surface.idMain = surface.idBase.idMain;
     if (!surface.idMain || surface.idMain == this.skip)
     {
         surface = default(global::ExplosionHelper.Surface);
         return(false);
     }
     surface.bounds = instance.physicalBounds;
     if (this.BoundsWork(ref surface.bounds, ref surface.work))
     {
         if (surface.work.rayTest)
         {
             bool flag;
             MeshBatchInstance meshBatchInstance;
             if (this.raycastLayerMask != 0 && Facepunch.MeshBatch.MeshBatchPhysics.Raycast(this.point, surface.work.rayDir, surface.work.rayDistance, this.raycastLayerMask, ref flag, ref meshBatchInstance))
             {
                 if (flag && meshBatchInstance == instance)
                 {
                     surface.blocked = false;
                 }
                 else
                 {
                     surface.blocked = true;
                 }
             }
             else
             {
                 surface.blocked = false;
             }
         }
         else
         {
             surface.blocked = false;
         }
         return(true);
     }
     surface = default(global::ExplosionHelper.Surface);
     return(false);
 }
Ejemplo n.º 5
0
 private bool SurfaceForMeshBatchInstance(MeshBatchInstance instance, ref ExplosionHelper.Surface surface)
 {
     surface.idBase = instance;
     surface.idMain = surface.idBase.idMain;
     if ((surface.idMain == null) || (surface.idMain == this.skip))
     {
         surface = new ExplosionHelper.Surface();
         return false;
     }
     surface.bounds = instance.physicalBounds;
     if (this.BoundsWork(ref surface.bounds, ref surface.work))
     {
         if (surface.work.rayTest)
         {
             bool flag;
             MeshBatchInstance instance2;
             if ((this.raycastLayerMask != 0) && Facepunch.MeshBatch.MeshBatchPhysics.Raycast(this.point, surface.work.rayDir, surface.work.rayDistance, this.raycastLayerMask, out flag, out instance2))
             {
                 if (flag && (instance2 == instance))
                 {
                     surface.blocked = false;
                 }
                 else
                 {
                     surface.blocked = true;
                 }
             }
             else
             {
                 surface.blocked = false;
             }
         }
         else
         {
             surface.blocked = false;
         }
         return true;
     }
     surface = new ExplosionHelper.Surface();
     return false;
 }
Ejemplo n.º 6
0
 void ResetEvent()
 {
     PlayerExecuteCommand           = null;
     EventoIniciado                 = false;
     ForceStartEvent                = false;
     EventoEncendido                = false;
     paredMadera                    = null;
     AtributeBolean                 = false;
     AtributeCollider               = null;
     AtributeInstance               = null;
     AtributeRayCharacter.direction = new Vector3(float.NaN, float.NaN, float.NaN);
     foreach (NetUser UserGame in JugadoresenJuego.Where(x => x.playerClient.GetComponent <PlayerStatus>() != null))
     {
         GameObject.Destroy(UserGame.playerClient.GetComponent <PlayerStatus>());
     }
     JugadoresenJuego.Clear();
     Players2.Clear();
     if (PlayersPostions.Count == 0)
     {
         PlayersPostions.Clear();
     }
 }
Ejemplo n.º 7
0
        private bool SurfaceForMeshBatchInstance(MeshBatchInstance instance, ref ExplosionHelper.Surface surface)
        {
            bool flag;
            MeshBatchInstance meshBatchInstance;

            surface.idBase = instance;
            surface.idMain = surface.idBase.idMain;
            if (!surface.idMain || surface.idMain == this.skip)
            {
                surface = new ExplosionHelper.Surface();
                return(false);
            }
            surface.bounds = instance.physicalBounds;
            if (!this.BoundsWork(ref surface.bounds, ref surface.work))
            {
                surface = new ExplosionHelper.Surface();
                return(false);
            }
            if (!surface.work.rayTest)
            {
                surface.blocked = false;
            }
            else if (this.raycastLayerMask == 0 || !Facepunch.MeshBatch.MeshBatchPhysics.Raycast(this.point, surface.work.rayDir, surface.work.rayDistance, this.raycastLayerMask, out flag, out meshBatchInstance))
            {
                surface.blocked = false;
            }
            else if (!flag || !(meshBatchInstance == instance))
            {
                surface.blocked = true;
            }
            else
            {
                surface.blocked = false;
            }
            return(true);
        }