// Token: 0x06000424 RID: 1060 RVA: 0x0001A2F8 File Offset: 0x000184F8
 private void Update()
 {
     if (Main.suicide.GetData <bool>() && SilentMelee0.smethod_1(SilentMelee0.smethod_0()) && SilentMelee0.smethod_2(SilentMelee0.smethod_0()) && SilentMelee0.smethod_3() >= this.nextAttack)
     {
         global::BasePlayer basePlayer = null;
         float num = 99999f;
         if (SilentMelee0.smethod_4() != null)
         {
             foreach (global::BasePlayer basePlayer2 in SilentMelee0.smethod_4())
             {
                 Vector3 vector = SilentMelee0.smethod_7(MainCamera.mainCamera, SilentMelee0.smethod_6(SilentMelee0.smethod_5(basePlayer2, "head")));
                 if (vector.z > 0f)
                 {
                     Vector2 vector2 = new Vector2(vector.x, (float)SilentMelee0.smethod_8() - vector.y);
                     float   num2    = Mathf.Abs(Vector2.Distance(new Vector2((float)(SilentMelee0.smethod_9() / 2), (float)(SilentMelee0.smethod_8() / 2)), new Vector2(vector2.x, (float)Screen.height - vector2.y)));
                     if (num2 <= num)
                     {
                         num        = num2;
                         basePlayer = basePlayer2;
                     }
                 }
             }
         }
         if (basePlayer != null && basePlayer.IsValid())
         {
             Vector3            position   = basePlayer.model.headBone.position;
             global::HeldEntity heldEntity = LocalPlayer.Entity.GetHeldEntity();
             if (heldEntity != null && heldEntity.IsValid())
             {
                 float     num3      = Vector3.Distance(LocalPlayer.Entity.transform.position, basePlayer.transform.position);
                 BaseMelee baseMelee = heldEntity as BaseMelee;
                 if (baseMelee != null && baseMelee.IsValid())
                 {
                     if (num3 < 2f)
                     {
                         using (PlayerAttack playerAttack = Pool.Get <PlayerAttack>())
                         {
                             playerAttack.attack = new Attack
                             {
                                 hitID            = basePlayer.net.ID,
                                 hitPositionWorld = basePlayer.FindBone("head").position,
                                 hitPositionLocal = new Vector3(-0.1f, -1f, 0f),
                                 hitNormalLocal   = new Vector3(0f, -1f, 0f),
                                 hitNormalWorld   = (MainCamera.mainCamera.transform.position - basePlayer.FindBone("head").position).normalized,
                                 pointStart       = LocalPlayer.Entity.transform.position,
                                 pointEnd         = basePlayer.FindBone("head").position
                             };
                             baseMelee.ServerRPC <PlayerAttack>("PlayerAttack", playerAttack);
                             Debug.Log("Stop hitting yourself xD");
                         }
                     }
                     this.nextAttack = Time.time + baseMelee.repeatDelay;
                 }
             }
         }
     }
 }
 private void Update()
 {
     if (CFG.Setting.hgf && LocalPlayer.Entity && LocalPlayer.Entity.IsValid() && Time.time >= nextAttack && global::BasePlayer.VisiblePlayerList != null)
     {
         foreach (StorageContainer storageContainer in companent.containers)
         {
             if (storageContainer != null && storageContainer.IsValid() && storageContainer.ShortPrefabName.Contains("barrel"))
             {
                 Vector3            position   = storageContainer.transform.position;
                 global::HeldEntity heldEntity = LocalPlayer.Entity.GetHeldEntity();
                 if (heldEntity != null && heldEntity.IsValid() && storageContainer.ShortPrefabName.Contains("barrel"))
                 {
                     float     num       = Vector3.Distance(LocalPlayer.Entity.transform.position, storageContainer.transform.position);
                     BaseMelee baseMelee = heldEntity as BaseMelee;
                     if (baseMelee != null && baseMelee.IsValid() && num < 7f && storageContainer.ShortPrefabName.Contains("barrel"))
                     {
                         using (PlayerAttack playerAttack = Pool.Get <PlayerAttack>())
                         {
                             playerAttack.attack = new Attack
                             {
                                 hitID            = storageContainer.net.ID,
                                 hitBone          = 0U,
                                 hitPartID        = 0U,
                                 hitMaterialID    = 0U,
                                 hitItem          = 0U,
                                 hitPositionWorld = storageContainer.transform.position,
                                 hitPositionLocal = new Vector3(-0.1f, -1f, 0f),
                                 hitNormalLocal   = new Vector3(0f, -1f, 0f),
                                 hitNormalWorld   = (MainCamera.mainCamera.transform.position - storageContainer.transform.position).normalized,
                                 pointStart       = MainCamera.mainCamera.transform.position,
                                 pointEnd         = storageContainer.transform.position
                             };
                             baseMelee.ServerRPC <PlayerAttack>("PlayerAttack", playerAttack);
                         }
                         nextAttack = Time.time + baseMelee.repeatDelay;
                     }
                 }
             }
         }
     }
 }