Example #1
0
        private void DisableContainedDummyParticles(ref MyExplosionInfo explosionInfo)
        {
            BoundingBox aabb = BoundingBox.CreateFromSphere(explosionInfo.ExplosionSphere);

            MyRender.GetEntitiesFromPrunningStructure(ref aabb, m_destroyHelper);

            foreach (var elem in m_destroyHelper)
            {
                var entity = ((MyRenderObject)elem).Entity;

                var dummyPoint = entity as MyDummyPoint;
                if (dummyPoint != null && !dummyPoint.CanSurvivePrefabDestruction())
                {
                    var position = dummyPoint.GetPosition();
                    dummyPoint.DisableParticleEffect();
                }
            }
        }