Skip to content

Commit

Permalink
fix: do not strip bomb
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalle Minkner committed Dec 26, 2024
1 parent 3d1e6b9 commit de80219
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/RollTheDice+DiceStripWeapons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ private string DiceStripWeapons(CCSPlayerController player, CCSPlayerPawn player
// ignore unknown weapons
if (weapon.Value == null || weapon.Value != null && weapon.Value.DesignerName == null) continue;
// ignore knife and C4
if (weapon.Value!.DesignerName == $"weapon_{CsItem.C4.ToString().ToLower()}"
|| weapon.Value!.DesignerName == $"weapon_{CsItem.Bomb.ToString().ToLower()}"
if (weapon.Value!.DesignerName == CsItem.C4.ToString().ToLower()
|| weapon.Value!.DesignerName == CsItem.Bomb.ToString().ToLower()
|| weapon.Value!.DesignerName == "weapon_knife" // necessary because CsItem.Knife is not always this value
|| weapon.Value!.DesignerName == $"weapon_{CsItem.Knife.ToString().ToLower()}"
|| weapon.Value!.DesignerName == $"weapon_{CsItem.KnifeCT.ToString().ToLower()}"
|| weapon.Value!.DesignerName == $"weapon_{CsItem.KnifeT.ToString().ToLower()}"
|| weapon.Value!.DesignerName == $"weapon_{CsItem.DefaultKnifeCT.ToString().ToLower()}"
|| weapon.Value!.DesignerName == $"weapon_{CsItem.DefaultKnifeT.ToString().ToLower()}")
|| weapon.Value!.DesignerName == CsItem.DefaultKnifeCT.ToString().ToLower()
|| weapon.Value!.DesignerName == CsItem.DefaultKnifeT.ToString().ToLower())
{
// save weapon raw
weaponRaw = weapon.Raw;
Expand Down

0 comments on commit de80219

Please sign in to comment.