Пример #1
0
        // Token: 0x06000E1D RID: 3613 RVA: 0x0003EF6C File Offset: 0x0003D16C
        private void TryZoneStart(Collider other)
        {
            CharacterBody component = other.GetComponent <CharacterBody>();

            if (!component)
            {
                return;
            }
            if (component.currentVehicle)
            {
                this.queuedCollisions.Add(new MapZone.CollisionInfo(this, other));
                return;
            }
            TeamComponent teamComponent = component.teamComponent;

            MapZone.ZoneType zoneType = this.zoneType;
            if (zoneType != MapZone.ZoneType.OutOfBounds)
            {
                if (zoneType != MapZone.ZoneType.KickOutPlayers)
                {
                    return;
                }
                if (teamComponent.teamIndex == TeamIndex.Player)
                {
                    this.TeleportBody(component);
                }
            }
            else
            {
                if (teamComponent.teamIndex == TeamIndex.Player)
                {
                    this.TeleportBody(component);
                    return;
                }
                if (NetworkServer.active)
                {
                    if (Physics.GetIgnoreLayerCollision(base.gameObject.layer, other.gameObject.layer))
                    {
                        return;
                    }
                    HealthComponent healthComponent = component.healthComponent;
                    if (healthComponent)
                    {
                        healthComponent.Suicide(healthComponent.lastHitAttacker, base.gameObject, DamageType.Generic);
                        return;
                    }
                }
            }
        }
Пример #2
0
 // Token: 0x06000E2E RID: 3630 RVA: 0x0003F358 File Offset: 0x0003D558
 private void FixedUpdate()
 {
     if (NetworkServer.active)
     {
         this.timer += Time.fixedDeltaTime;
         if (this.timer >= this.lifeTimer && !this.hasDied)
         {
             GameObject bodyObject = this.characterMaster.GetBodyObject();
             if (bodyObject)
             {
                 HealthComponent component = bodyObject.GetComponent <HealthComponent>();
                 if (component)
                 {
                     component.Suicide(null, null, DamageType.Generic);
                     this.hasDied = true;
                 }
             }
         }
     }
 }
Пример #3
0
        // Token: 0x0600118C RID: 4492 RVA: 0x0005700C File Offset: 0x0005520C
        private void TryZone(Collider other)
        {
            CharacterBody component = other.GetComponent <CharacterBody>();

            if (component)
            {
                TeamComponent    component2 = component.GetComponent <TeamComponent>();
                MapZone.ZoneType zoneType   = this.zoneType;
                if (zoneType != MapZone.ZoneType.OutOfBounds)
                {
                    if (zoneType != MapZone.ZoneType.KickOutPlayers)
                    {
                        return;
                    }
                    if (component2.teamIndex == TeamIndex.Player)
                    {
                        this.TeleportBody(component);
                    }
                }
                else if (Util.HasEffectiveAuthority(component.gameObject))
                {
                    if (component2.teamIndex == TeamIndex.Player)
                    {
                        this.TeleportBody(component);
                        return;
                    }
                    if (NetworkServer.active)
                    {
                        HealthComponent healthComponent = component.healthComponent;
                        if (healthComponent)
                        {
                            healthComponent.Suicide(null);
                            return;
                        }
                    }
                }
            }
        }