Weapon::SetItemSlot() fixed missing bitwise negate

This commit is contained in:
smallmodel 2023-11-15 19:36:09 +01:00
parent 6a6eeae4ee
commit c399f45841
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -4373,7 +4373,7 @@ const_str Weapon::GetWeaponGroup(void) const
//======================
void Weapon::SetItemSlot(int slot)
{
weapon_class &= WEAPON_CLASS_ITEM_SLOT_BITS;
weapon_class &= ~WEAPON_CLASS_ITEM_SLOT_BITS;
weapon_class |= slot & WEAPON_CLASS_ITEM_SLOT_BITS;
}