LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[BUG]: FirearmItem.BaseWeight returns Base.BaseLength instead of Base.BaseWeight

Open efrosim opened this issue 3 weeks ago • 0 comments

Before You Report

  • [x] I have searched for existing reports of this bug, and this bug report is unique.

Version

1.1.7

Description

FirearmItem.BaseWeight property incorrectly references Base.BaseLength instead of Base.BaseWeight, returning the firearm's length in inches instead of its base weight in kilograms.

To Reproduce

  1. Obtain a FirearmItem wrapper for any weapon.
  2. Read firearmItem.BaseWeight.
  3. Compare the value with firearmItem.BaseLength — both return the identical length value.

Expected Behavior

FirearmItem.BaseWeight should return Base.BaseWeight.

Additional Information

In LabApi/Features/Wrappers/Items/Firearm/FirearmItem.cs lines 121-124:

/// <summary>
/// Gets the weight of the firearm in kilograms without any attachments.
/// </summary>
public float BaseWeight => Base.BaseLength;

Proposed fix:

public float BaseWeight => Base.BaseWeight;

efrosim avatar Nov 11 '26 18:11 efrosim