示例#1
0
        // Token: 0x060033BF RID: 13247 RVA: 0x0014FA48 File Offset: 0x0014DE48
        public static void alert(Vector3 position, float radius)
        {
            float sqrRadius = radius * radius;

            if (LevelNavigation.checkNavigation(position))
            {
                AlertTool.zombiesInRadius.Clear();
                ZombieManager.getZombiesInRadius(position, sqrRadius, AlertTool.zombiesInRadius);
                for (int i = 0; i < AlertTool.zombiesInRadius.Count; i++)
                {
                    Zombie zombie = AlertTool.zombiesInRadius[i];
                    if (!zombie.isDead)
                    {
                        zombie.alert(position, true);
                    }
                }
            }
            AlertTool.animalsInRadius.Clear();
            AnimalManager.getAnimalsInRadius(position, sqrRadius, AlertTool.animalsInRadius);
            for (int j = 0; j < AlertTool.animalsInRadius.Count; j++)
            {
                Animal animal = AlertTool.animalsInRadius[j];
                if (!animal.isDead)
                {
                    if (animal.asset != null)
                    {
                        if (animal.asset.behaviour != EAnimalBehaviour.IGNORE)
                        {
                            animal.alertPoint(position, true);
                        }
                    }
                }
            }
        }
示例#2
0
        // Token: 0x060033BE RID: 13246 RVA: 0x0014F69C File Offset: 0x0014DA9C
        public static void alert(Player player, Vector3 position, float radius, bool sneak, Vector3 spotDir, bool isSpotOn)
        {
            radius *= Provider.modeConfigData.Players.Detect_Radius_Multiplier;
            radius  = Mathf.Clamp(radius, 0f, 64f);
            if (player == null)
            {
                return;
            }
            float sqrRadius = radius * radius;

            if (player.movement.nav != 255)
            {
                if (ZombieManager.regions[(int)player.movement.nav].hasBeacon)
                {
                    for (int i = 0; i < ZombieManager.regions[(int)player.movement.nav].zombies.Count; i++)
                    {
                        Zombie zombie = ZombieManager.regions[(int)player.movement.nav].zombies[i];
                        if (!zombie.isDead)
                        {
                            if (zombie.checkAlert(player))
                            {
                                zombie.alert(player);
                            }
                        }
                    }
                }
                AlertTool.zombiesInRadius.Clear();
                ZombieManager.getZombiesInRadius(position, sqrRadius, AlertTool.zombiesInRadius);
                for (int j = 0; j < AlertTool.zombiesInRadius.Count; j++)
                {
                    Zombie zombie2 = AlertTool.zombiesInRadius[j];
                    if (!zombie2.isDead)
                    {
                        if (zombie2.checkAlert(player))
                        {
                            Vector3 vector = zombie2.transform.position - position;
                            if (AlertTool.check(zombie2.transform.forward, vector, sqrRadius, sneak, spotDir, isSpotOn))
                            {
                                RaycastHit raycastHit;
                                Physics.Raycast(zombie2.transform.position + Vector3.up, -vector, out raycastHit, vector.magnitude * 0.95f, RayMasks.BLOCK_VISION);
                                if (!(raycastHit.transform != null))
                                {
                                    zombie2.alert(player);
                                }
                            }
                        }
                    }
                }
            }
            AlertTool.animalsInRadius.Clear();
            AnimalManager.getAnimalsInRadius(position, sqrRadius, AlertTool.animalsInRadius);
            for (int k = 0; k < AlertTool.animalsInRadius.Count; k++)
            {
                Animal animal = AlertTool.animalsInRadius[k];
                if (!animal.isDead)
                {
                    if (animal.asset != null)
                    {
                        if (animal.asset.behaviour == EAnimalBehaviour.DEFENSE)
                        {
                            if (!animal.isFleeing)
                            {
                                Vector3 vector2 = animal.transform.position - position;
                                if (!AlertTool.check(animal.transform.forward, vector2, sqrRadius, sneak, spotDir, isSpotOn))
                                {
                                    goto IL_385;
                                }
                                RaycastHit raycastHit;
                                Physics.Raycast(animal.transform.position + Vector3.up, -vector2, out raycastHit, vector2.magnitude * 0.95f, RayMasks.BLOCK_VISION);
                                if (raycastHit.transform != null)
                                {
                                    goto IL_385;
                                }
                            }
                            animal.alertPoint(player.transform.position, true);
                        }
                        else if (animal.asset.behaviour == EAnimalBehaviour.OFFENSE)
                        {
                            if (animal.checkAlert(player))
                            {
                                Vector3 vector3 = animal.transform.position - position;
                                if (AlertTool.check(animal.transform.forward, vector3, sqrRadius, sneak, spotDir, isSpotOn))
                                {
                                    RaycastHit raycastHit;
                                    Physics.Raycast(animal.transform.position + Vector3.up, -vector3, out raycastHit, vector3.magnitude * 0.95f, RayMasks.BLOCK_VISION);
                                    if (!(raycastHit.transform != null))
                                    {
                                        animal.alertPlayer(player, true);
                                    }
                                }
                            }
                        }
                    }
                }
                IL_385 :;
            }
        }
示例#3
0
        // Token: 0x060033E3 RID: 13283 RVA: 0x00151418 File Offset: 0x0014F818
        public static void explode(Vector3 point, float damageRadius, EDeathCause cause, CSteamID killer, float playerDamage, float zombieDamage, float animalDamage, float barricadeDamage, float structureDamage, float vehicleDamage, float resourceDamage, float objectDamage, out List <EPlayerKill> kills, EExplosionDamageType damageType = EExplosionDamageType.CONVENTIONAL, float alertRadius = 32f, bool playImpactEffect = true, bool penetrateBuildables = false)
        {
            DamageTool.explosionKills.Clear();
            kills = DamageTool.explosionKills;
            DamageTool.explosionRangeComparator.point = point;
            float num = damageRadius * damageRadius;

            DamageTool.regionsInRadius.Clear();
            Regions.getRegionsInRadius(point, damageRadius, DamageTool.regionsInRadius);
            int layerMask;

            if (penetrateBuildables)
            {
                layerMask = RayMasks.BLOCK_EXPLOSION_PENETRATE_BUILDABLES;
            }
            else
            {
                layerMask = RayMasks.BLOCK_EXPLOSION;
            }
            if (structureDamage > 0.5f)
            {
                DamageTool.structuresInRadius.Clear();
                StructureManager.getStructuresInRadius(point, num, DamageTool.regionsInRadius, DamageTool.structuresInRadius);
                DamageTool.structuresInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int i = 0; i < DamageTool.structuresInRadius.Count; i++)
                {
                    Transform transform = DamageTool.structuresInRadius[i];
                    if (!(transform == null))
                    {
                        ushort id;
                        if (ushort.TryParse(transform.name, out id))
                        {
                            ItemStructureAsset itemStructureAsset = (ItemStructureAsset)Assets.find(EAssetType.ITEM, id);
                            if (itemStructureAsset != null && !itemStructureAsset.proofExplosion)
                            {
                                Vector3 a         = transform.transform.position - point;
                                float   magnitude = a.magnitude;
                                Vector3 direction = a / magnitude;
                                if (magnitude > 0.5f)
                                {
                                    RaycastHit raycastHit;
                                    PhysicsUtility.raycast(new Ray(point, direction), out raycastHit, magnitude - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                                    if (raycastHit.transform != null && raycastHit.transform != transform.transform)
                                    {
                                        goto IL_17D;
                                    }
                                }
                                StructureManager.damage(transform, a.normalized, structureDamage, 1f - magnitude / damageRadius, true);
                            }
                        }
                    }
                    IL_17D :;
                }
            }
            if (resourceDamage > 0.5f)
            {
                DamageTool.resourcesInRadius.Clear();
                ResourceManager.getResourcesInRadius(point, num, DamageTool.regionsInRadius, DamageTool.resourcesInRadius);
                DamageTool.resourcesInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int j = 0; j < DamageTool.resourcesInRadius.Count; j++)
                {
                    Transform transform2 = DamageTool.resourcesInRadius[j];
                    if (!(transform2 == null))
                    {
                        Vector3 a2         = transform2.transform.position - point;
                        float   magnitude2 = a2.magnitude;
                        Vector3 direction2 = a2 / magnitude2;
                        if (magnitude2 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, direction2), out raycastHit, magnitude2 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                            if (raycastHit.transform != null && raycastHit.transform != transform2.transform)
                            {
                                goto IL_2A2;
                            }
                        }
                        EPlayerKill eplayerKill;
                        uint        num2;
                        ResourceManager.damage(transform2, a2.normalized, resourceDamage, 1f - magnitude2 / damageRadius, 1f, out eplayerKill, out num2);
                        if (eplayerKill != EPlayerKill.NONE)
                        {
                            kills.Add(eplayerKill);
                        }
                    }
                    IL_2A2 :;
                }
            }
            if (objectDamage > 0.5f)
            {
                DamageTool.objectsInRadius.Clear();
                ObjectManager.getObjectsInRadius(point, num, DamageTool.regionsInRadius, DamageTool.objectsInRadius);
                DamageTool.objectsInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int k = 0; k < DamageTool.objectsInRadius.Count; k++)
                {
                    Transform transform3 = DamageTool.objectsInRadius[k];
                    if (!(transform3 == null))
                    {
                        InteractableObjectRubble component = transform3.GetComponent <InteractableObjectRubble>();
                        if (!(component == null))
                        {
                            if (!component.asset.rubbleProofExplosion)
                            {
                                for (byte b = 0; b < component.getSectionCount(); b += 1)
                                {
                                    Transform section = component.getSection(b);
                                    Vector3   a3      = section.position - point;
                                    if (a3.sqrMagnitude < num)
                                    {
                                        float   magnitude3 = a3.magnitude;
                                        Vector3 direction3 = a3 / magnitude3;
                                        if (magnitude3 > 0.5f)
                                        {
                                            RaycastHit raycastHit;
                                            PhysicsUtility.raycast(new Ray(point, direction3), out raycastHit, magnitude3 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                                            if (raycastHit.transform != null && raycastHit.transform != transform3.transform)
                                            {
                                                goto IL_40B;
                                            }
                                        }
                                        EPlayerKill eplayerKill;
                                        uint        num2;
                                        ObjectManager.damage(transform3, a3.normalized, b, objectDamage, 1f - magnitude3 / damageRadius, out eplayerKill, out num2);
                                        if (eplayerKill != EPlayerKill.NONE)
                                        {
                                            kills.Add(eplayerKill);
                                        }
                                    }
                                    IL_40B :;
                                }
                            }
                        }
                    }
                }
            }
            if (barricadeDamage > 0.5f)
            {
                DamageTool.barricadesInRadius.Clear();
                BarricadeManager.getBarricadesInRadius(point, num, DamageTool.regionsInRadius, DamageTool.barricadesInRadius);
                BarricadeManager.getBarricadesInRadius(point, num, DamageTool.barricadesInRadius);
                DamageTool.barricadesInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int l = 0; l < DamageTool.barricadesInRadius.Count; l++)
                {
                    Transform transform4 = DamageTool.barricadesInRadius[l];
                    if (!(transform4 == null))
                    {
                        Vector3 a4         = transform4.transform.position - point;
                        float   magnitude4 = a4.magnitude;
                        Vector3 direction4 = a4 / magnitude4;
                        if (magnitude4 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, direction4), out raycastHit, magnitude4 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                            if (raycastHit.transform != null && raycastHit.transform != transform4.transform)
                            {
                                goto IL_568;
                            }
                        }
                        ushort id2;
                        if (ushort.TryParse(transform4.name, out id2))
                        {
                            ItemBarricadeAsset itemBarricadeAsset = (ItemBarricadeAsset)Assets.find(EAssetType.ITEM, id2);
                            if (itemBarricadeAsset != null && !itemBarricadeAsset.proofExplosion)
                            {
                                BarricadeManager.damage(transform4, barricadeDamage, 1f - magnitude4 / damageRadius, true);
                            }
                        }
                    }
                    IL_568 :;
                }
            }
            if ((Provider.isPvP || damageType == EExplosionDamageType.ZOMBIE_ACID || damageType == EExplosionDamageType.ZOMBIE_FIRE || damageType == EExplosionDamageType.ZOMBIE_ELECTRIC) && playerDamage > 0.5f)
            {
                DamageTool.playersInRadius.Clear();
                PlayerTool.getPlayersInRadius(point, num, DamageTool.playersInRadius);
                for (int m = 0; m < DamageTool.playersInRadius.Count; m++)
                {
                    Player player = DamageTool.playersInRadius[m];
                    if (!(player == null) && !player.life.isDead)
                    {
                        if (damageType != EExplosionDamageType.ZOMBIE_FIRE || player.clothing.shirtAsset == null || !player.clothing.shirtAsset.proofFire || player.clothing.pantsAsset == null || !player.clothing.pantsAsset.proofFire)
                        {
                            Vector3 a5         = player.transform.position - point;
                            float   magnitude5 = a5.magnitude;
                            Vector3 vector     = a5 / magnitude5;
                            if (magnitude5 > 0.5f)
                            {
                                RaycastHit raycastHit;
                                PhysicsUtility.raycast(new Ray(point, vector), out raycastHit, magnitude5 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                                if (raycastHit.transform != null && raycastHit.transform != player.transform)
                                {
                                    goto IL_7AA;
                                }
                            }
                            if (playImpactEffect)
                            {
                                EffectManager.sendEffect(5, EffectManager.SMALL, player.transform.position + Vector3.up, -vector);
                                EffectManager.sendEffect(5, EffectManager.SMALL, player.transform.position + Vector3.up, Vector3.up);
                            }
                            float num3 = 1f - Mathf.Pow(magnitude5 / damageRadius, 2f);
                            if (player.movement.getVehicle() != null && player.movement.getVehicle().asset != null)
                            {
                                num3 *= player.movement.getVehicle().asset.passengerExplosionArmor;
                            }
                            EPlayerKill eplayerKill;
                            DamageTool.damage(player, cause, ELimb.SPINE, killer, vector, playerDamage, num3, out eplayerKill);
                            if (eplayerKill != EPlayerKill.NONE)
                            {
                                kills.Add(eplayerKill);
                            }
                        }
                    }
                    IL_7AA :;
                }
            }
            if (damageType == EExplosionDamageType.ZOMBIE_FIRE || zombieDamage > 0.5f)
            {
                DamageTool.zombiesInRadius.Clear();
                ZombieManager.getZombiesInRadius(point, num, DamageTool.zombiesInRadius);
                for (int n = 0; n < DamageTool.zombiesInRadius.Count; n++)
                {
                    Zombie zombie = DamageTool.zombiesInRadius[n];
                    if (!(zombie == null) && !zombie.isDead)
                    {
                        if (damageType == EExplosionDamageType.ZOMBIE_FIRE)
                        {
                            if (zombie.speciality == EZombieSpeciality.NORMAL)
                            {
                                ZombieManager.sendZombieSpeciality(zombie, EZombieSpeciality.BURNER);
                            }
                        }
                        else
                        {
                            Vector3 a6         = zombie.transform.position - point;
                            float   magnitude6 = a6.magnitude;
                            Vector3 vector2    = a6 / magnitude6;
                            if (magnitude6 > 0.5f)
                            {
                                RaycastHit raycastHit;
                                PhysicsUtility.raycast(new Ray(point, vector2), out raycastHit, magnitude6 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                                if (raycastHit.transform != null && raycastHit.transform != zombie.transform)
                                {
                                    goto IL_964;
                                }
                            }
                            if (playImpactEffect)
                            {
                                EffectManager.sendEffect((!zombie.isRadioactive) ? 5 : 95, EffectManager.SMALL, zombie.transform.position + Vector3.up, -vector2);
                                EffectManager.sendEffect((!zombie.isRadioactive) ? 5 : 95, EffectManager.SMALL, zombie.transform.position + Vector3.up, Vector3.up);
                            }
                            EPlayerKill eplayerKill;
                            uint        num2;
                            DamageTool.damage(zombie, vector2, zombieDamage, 1f - magnitude6 / damageRadius, out eplayerKill, out num2);
                            if (eplayerKill != EPlayerKill.NONE)
                            {
                                kills.Add(eplayerKill);
                            }
                        }
                    }
                    IL_964 :;
                }
            }
            if (animalDamage > 0.5f)
            {
                DamageTool.animalsInRadius.Clear();
                AnimalManager.getAnimalsInRadius(point, num, DamageTool.animalsInRadius);
                for (int num4 = 0; num4 < DamageTool.animalsInRadius.Count; num4++)
                {
                    Animal animal = DamageTool.animalsInRadius[num4];
                    if (!(animal == null) && !animal.isDead)
                    {
                        Vector3 a7         = animal.transform.position - point;
                        float   magnitude7 = a7.magnitude;
                        Vector3 vector3    = a7 / magnitude7;
                        if (magnitude7 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, vector3), out raycastHit, magnitude7 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                            if (raycastHit.transform != null && raycastHit.transform != animal.transform)
                            {
                                goto IL_ACC;
                            }
                        }
                        if (playImpactEffect)
                        {
                            EffectManager.sendEffect(5, EffectManager.SMALL, animal.transform.position + Vector3.up, -vector3);
                            EffectManager.sendEffect(5, EffectManager.SMALL, animal.transform.position + Vector3.up, Vector3.up);
                        }
                        EPlayerKill eplayerKill;
                        uint        num2;
                        DamageTool.damage(animal, vector3, animalDamage, 1f - magnitude7 / damageRadius, out eplayerKill, out num2);
                        if (eplayerKill != EPlayerKill.NONE)
                        {
                            kills.Add(eplayerKill);
                        }
                    }
                    IL_ACC :;
                }
            }
            if (vehicleDamage > 0.5f)
            {
                DamageTool.vehiclesInRadius.Clear();
                VehicleManager.getVehiclesInRadius(point, num, DamageTool.vehiclesInRadius);
                for (int num5 = 0; num5 < DamageTool.vehiclesInRadius.Count; num5++)
                {
                    InteractableVehicle interactableVehicle = DamageTool.vehiclesInRadius[num5];
                    if (!(interactableVehicle == null) && !interactableVehicle.isDead)
                    {
                        if (interactableVehicle.asset != null && interactableVehicle.asset.isVulnerableToExplosions)
                        {
                            Vector3 a8         = interactableVehicle.transform.position - point;
                            float   magnitude8 = a8.magnitude;
                            Vector3 direction5 = a8 / magnitude8;
                            if (magnitude8 > 0.5f)
                            {
                                RaycastHit raycastHit;
                                PhysicsUtility.raycast(new Ray(point, direction5), out raycastHit, magnitude8 - 0.5f, layerMask, QueryTriggerInteraction.UseGlobal);
                                if (raycastHit.transform != null && raycastHit.transform != interactableVehicle.transform)
                                {
                                    goto IL_BED;
                                }
                            }
                            VehicleManager.damage(interactableVehicle, vehicleDamage, 1f - magnitude8 / damageRadius, false);
                        }
                    }
                    IL_BED :;
                }
            }
            AlertTool.alert(point, alertRadius);
        }
示例#4
0
        public static void explode(Vector3 point, float damageRadius, EDeathCause cause, CSteamID killer, float playerDamage, float zombieDamage, float animalDamage, float barricadeDamage, float structureDamage, float vehicleDamage, float resourceDamage, float objectDamage, EExplosionDamageType damageType = EExplosionDamageType.CONVENTIONAL, float alertRadius = 32f, bool playImpactEffect = true)
        {
            DamageTool.explosionRangeComparator.point = point;
            float num = damageRadius * damageRadius;

            DamageTool.regionsInRadius.Clear();
            Regions.getRegionsInRadius(point, damageRadius, DamageTool.regionsInRadius);
            if (structureDamage > 0.5f)
            {
                DamageTool.structuresInRadius.Clear();
                StructureManager.getStructuresInRadius(point, num, DamageTool.regionsInRadius, DamageTool.structuresInRadius);
                DamageTool.structuresInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int i = 0; i < DamageTool.structuresInRadius.Count; i++)
                {
                    Transform transform = DamageTool.structuresInRadius[i];
                    if (!(transform == null))
                    {
                        ushort id;
                        if (ushort.TryParse(transform.name, out id))
                        {
                            ItemStructureAsset itemStructureAsset = (ItemStructureAsset)Assets.find(EAssetType.ITEM, id);
                            if (itemStructureAsset != null && !itemStructureAsset.proofExplosion)
                            {
                                Vector3 vector    = transform.transform.position - point;
                                float   magnitude = vector.magnitude;
                                Vector3 vector2   = vector / magnitude;
                                if (magnitude > 0.5f)
                                {
                                    RaycastHit raycastHit;
                                    PhysicsUtility.raycast(new Ray(point, vector2), out raycastHit, magnitude - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                                    if (raycastHit.transform != null && raycastHit.transform != transform.transform)
                                    {
                                        goto IL_154;
                                    }
                                }
                                StructureManager.damage(transform, vector.normalized, structureDamage, 1f - magnitude / damageRadius, true);
                            }
                        }
                    }
                    IL_154 :;
                }
            }
            if (resourceDamage > 0.5f)
            {
                DamageTool.resourcesInRadius.Clear();
                ResourceManager.getResourcesInRadius(point, num, DamageTool.regionsInRadius, DamageTool.resourcesInRadius);
                DamageTool.resourcesInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int j = 0; j < DamageTool.resourcesInRadius.Count; j++)
                {
                    Transform transform2 = DamageTool.resourcesInRadius[j];
                    if (!(transform2 == null))
                    {
                        Vector3 vector3    = transform2.transform.position - point;
                        float   magnitude2 = vector3.magnitude;
                        Vector3 vector4    = vector3 / magnitude2;
                        if (magnitude2 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, vector4), out raycastHit, magnitude2 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                            if (raycastHit.transform != null && raycastHit.transform != transform2.transform)
                            {
                                goto IL_26D;
                            }
                        }
                        EPlayerKill eplayerKill;
                        uint        num2;
                        ResourceManager.damage(transform2, vector3.normalized, resourceDamage, 1f - magnitude2 / damageRadius, 1f, out eplayerKill, out num2);
                    }
                    IL_26D :;
                }
            }
            if (objectDamage > 0.5f)
            {
                DamageTool.objectsInRadius.Clear();
                ObjectManager.getObjectsInRadius(point, num, DamageTool.regionsInRadius, DamageTool.objectsInRadius);
                DamageTool.objectsInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int k = 0; k < DamageTool.objectsInRadius.Count; k++)
                {
                    Transform transform3 = DamageTool.objectsInRadius[k];
                    if (!(transform3 == null))
                    {
                        InteractableObjectRubble component = transform3.GetComponent <InteractableObjectRubble>();
                        if (!(component == null))
                        {
                            if (!component.asset.rubbleProofExplosion)
                            {
                                for (byte b = 0; b < component.getSectionCount(); b += 1)
                                {
                                    Transform section = component.getSection(b);
                                    Vector3   vector5 = section.position - point;
                                    if (vector5.sqrMagnitude < num)
                                    {
                                        float   magnitude3 = vector5.magnitude;
                                        Vector3 vector6    = vector5 / magnitude3;
                                        if (magnitude3 > 0.5f)
                                        {
                                            RaycastHit raycastHit;
                                            PhysicsUtility.raycast(new Ray(point, vector6), out raycastHit, magnitude3 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                                            if (raycastHit.transform != null && raycastHit.transform != transform3.transform)
                                            {
                                                goto IL_3CA;
                                            }
                                        }
                                        EPlayerKill eplayerKill;
                                        uint        num2;
                                        ObjectManager.damage(transform3, vector5.normalized, b, objectDamage, 1f - magnitude3 / damageRadius, out eplayerKill, out num2);
                                    }
                                    IL_3CA :;
                                }
                            }
                        }
                    }
                }
            }
            if (barricadeDamage > 0.5f)
            {
                DamageTool.barricadesInRadius.Clear();
                BarricadeManager.getBarricadesInRadius(point, num, DamageTool.regionsInRadius, DamageTool.barricadesInRadius);
                BarricadeManager.getBarricadesInRadius(point, num, DamageTool.barricadesInRadius);
                DamageTool.barricadesInRadius.Sort(DamageTool.explosionRangeComparator);
                for (int l = 0; l < DamageTool.barricadesInRadius.Count; l++)
                {
                    Transform transform4 = DamageTool.barricadesInRadius[l];
                    if (!(transform4 == null))
                    {
                        Vector3 vector7    = transform4.transform.position - point;
                        float   magnitude4 = vector7.magnitude;
                        Vector3 vector8    = vector7 / magnitude4;
                        if (magnitude4 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, vector8), out raycastHit, magnitude4 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                            if (raycastHit.transform != null && raycastHit.transform != transform4.transform)
                            {
                                goto IL_52A;
                            }
                        }
                        ushort id2;
                        if (ushort.TryParse(transform4.name, out id2))
                        {
                            ItemBarricadeAsset itemBarricadeAsset = (ItemBarricadeAsset)Assets.find(EAssetType.ITEM, id2);
                            if (itemBarricadeAsset != null && !itemBarricadeAsset.proofExplosion)
                            {
                                BarricadeManager.damage(transform4, barricadeDamage, 1f - magnitude4 / damageRadius, true);
                            }
                        }
                    }
                    IL_52A :;
                }
            }
            if ((Provider.isPvP || damageType == EExplosionDamageType.ZOMBIE_ACID || damageType == EExplosionDamageType.ZOMBIE_FIRE || damageType == EExplosionDamageType.ZOMBIE_ELECTRIC) && playerDamage > 0.5f)
            {
                DamageTool.playersInRadius.Clear();
                PlayerTool.getPlayersInRadius(point, num, DamageTool.playersInRadius);
                for (int m = 0; m < DamageTool.playersInRadius.Count; m++)
                {
                    Player player = DamageTool.playersInRadius[m];
                    if (!(player == null) && !player.life.isDead)
                    {
                        if (damageType != EExplosionDamageType.ZOMBIE_FIRE || player.clothing.shirtAsset == null || !player.clothing.shirtAsset.proofFire || player.clothing.pantsAsset == null || !player.clothing.pantsAsset.proofFire)
                        {
                            Vector3 vector9    = player.transform.position - point;
                            float   magnitude5 = vector9.magnitude;
                            Vector3 vector10   = vector9 / magnitude5;
                            if (magnitude5 > 0.5f)
                            {
                                RaycastHit raycastHit;
                                PhysicsUtility.raycast(new Ray(point, vector10), out raycastHit, magnitude5 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                                if (raycastHit.transform != null && raycastHit.transform != player.transform)
                                {
                                    goto IL_760;
                                }
                            }
                            if (playImpactEffect)
                            {
                                EffectManager.sendEffect(5, EffectManager.SMALL, player.transform.position + Vector3.up, -vector10);
                                EffectManager.sendEffect(5, EffectManager.SMALL, player.transform.position + Vector3.up, Vector3.up);
                            }
                            float num3 = 1f - Mathf.Pow(magnitude5 / damageRadius, 2f);
                            if (player.movement.getVehicle() != null && player.movement.getVehicle().asset != null)
                            {
                                num3 *= player.movement.getVehicle().asset.passengerExplosionArmor;
                            }
                            EPlayerKill eplayerKill;
                            DamageTool.damage(player, cause, ELimb.SPINE, killer, vector10, playerDamage, num3, out eplayerKill);
                        }
                    }
                    IL_760 :;
                }
            }
            if (damageType == EExplosionDamageType.ZOMBIE_FIRE || zombieDamage > 0.5f)
            {
                DamageTool.zombiesInRadius.Clear();
                ZombieManager.getZombiesInRadius(point, num, DamageTool.zombiesInRadius);
                for (int n = 0; n < DamageTool.zombiesInRadius.Count; n++)
                {
                    Zombie zombie = DamageTool.zombiesInRadius[n];
                    if (!(zombie == null) && !zombie.isDead)
                    {
                        if (damageType == EExplosionDamageType.ZOMBIE_FIRE)
                        {
                            if (zombie.speciality == EZombieSpeciality.NORMAL)
                            {
                                ZombieManager.sendZombieSpeciality(zombie, EZombieSpeciality.BURNER);
                            }
                        }
                        else
                        {
                            Vector3 vector11   = zombie.transform.position - point;
                            float   magnitude6 = vector11.magnitude;
                            Vector3 vector12   = vector11 / magnitude6;
                            if (magnitude6 > 0.5f)
                            {
                                RaycastHit raycastHit;
                                PhysicsUtility.raycast(new Ray(point, vector12), out raycastHit, magnitude6 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                                if (raycastHit.transform != null && raycastHit.transform != zombie.transform)
                                {
                                    goto IL_90E;
                                }
                            }
                            if (playImpactEffect)
                            {
                                EffectManager.sendEffect((!zombie.isRadioactive) ? 5 : 95, EffectManager.SMALL, zombie.transform.position + Vector3.up, -vector12);
                                EffectManager.sendEffect((!zombie.isRadioactive) ? 5 : 95, EffectManager.SMALL, zombie.transform.position + Vector3.up, Vector3.up);
                            }
                            EPlayerKill eplayerKill;
                            uint        num2;
                            DamageTool.damage(zombie, vector12, zombieDamage, 1f - magnitude6 / damageRadius, out eplayerKill, out num2);
                        }
                    }
                    IL_90E :;
                }
            }
            if (animalDamage > 0.5f)
            {
                DamageTool.animalsInRadius.Clear();
                AnimalManager.getAnimalsInRadius(point, num, DamageTool.animalsInRadius);
                for (int num4 = 0; num4 < DamageTool.animalsInRadius.Count; num4++)
                {
                    Animal animal = DamageTool.animalsInRadius[num4];
                    if (!(animal == null) && !animal.isDead)
                    {
                        Vector3 vector13   = animal.transform.position - point;
                        float   magnitude7 = vector13.magnitude;
                        Vector3 vector14   = vector13 / magnitude7;
                        if (magnitude7 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, vector14), out raycastHit, magnitude7 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                            if (raycastHit.transform != null && raycastHit.transform != animal.transform)
                            {
                                goto IL_A6A;
                            }
                        }
                        if (playImpactEffect)
                        {
                            EffectManager.sendEffect(5, EffectManager.SMALL, animal.transform.position + Vector3.up, -vector14);
                            EffectManager.sendEffect(5, EffectManager.SMALL, animal.transform.position + Vector3.up, Vector3.up);
                        }
                        EPlayerKill eplayerKill;
                        uint        num2;
                        DamageTool.damage(animal, vector14, animalDamage, 1f - magnitude7 / damageRadius, out eplayerKill, out num2);
                    }
                    IL_A6A :;
                }
            }
            if (vehicleDamage > 0.5f)
            {
                DamageTool.vehiclesInRadius.Clear();
                VehicleManager.getVehiclesInRadius(point, num, DamageTool.vehiclesInRadius);
                for (int num5 = 0; num5 < DamageTool.vehiclesInRadius.Count; num5++)
                {
                    InteractableVehicle interactableVehicle = DamageTool.vehiclesInRadius[num5];
                    if (!(interactableVehicle == null) && !interactableVehicle.isDead)
                    {
                        Vector3 vector15   = interactableVehicle.transform.position - point;
                        float   magnitude8 = vector15.magnitude;
                        Vector3 vector16   = vector15 / magnitude8;
                        if (magnitude8 > 0.5f)
                        {
                            RaycastHit raycastHit;
                            PhysicsUtility.raycast(new Ray(point, vector16), out raycastHit, magnitude8 - 0.5f, RayMasks.BLOCK_EXPLOSION, 0);
                            if (raycastHit.transform != null && raycastHit.transform != interactableVehicle.transform)
                            {
                                goto IL_B6C;
                            }
                        }
                        VehicleManager.damage(interactableVehicle, vehicleDamage, 1f - magnitude8 / damageRadius, false);
                    }
                    IL_B6C :;
                }
            }
            AlertTool.alert(point, alertRadius);
        }