From 6f67afe668320df00d4b7d270e2baca72f9330cc Mon Sep 17 00:00:00 2001 From: TtroubleTT Date: Mon, 28 Apr 2025 16:00:45 -0700 Subject: [PATCH 1/2] fix custom weapons not doing default damage when set to below 0 --- EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs index 68fe0103e7..94ae21ccea 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs @@ -205,7 +205,7 @@ protected virtual void OnShot(ShotEventArgs ev) /// . protected virtual void OnHurting(HurtingEventArgs ev) { - if (ev.IsAllowed && Damage != float.NaN) + if (ev.IsAllowed && Damage >= 0) ev.Amount = Damage; } From a88e634ba5bbf1d32946184106f5a9c7b05d1abe Mon Sep 17 00:00:00 2001 From: TtroubleTT Date: Mon, 28 Apr 2025 22:42:11 -0700 Subject: [PATCH 2/2] make default damage -1 --- EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs index 94ae21ccea..277037494e 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs @@ -52,7 +52,7 @@ public override ItemType Type /// /// Gets or sets the weapon damage. /// - public virtual float Damage { get; set; } = float.NaN; + public virtual float Damage { get; set; } = -1; /// /// Gets or sets a value indicating how big of a clip the weapon will have.