Fix removeWeaponComponent not working correctly

This commit is contained in:
Andrea Passarini
2020-04-07 04:43:24 +02:00
committed by GitHub
parent b0215b9671
commit 9f1a18d420
+1 -1
View File
@@ -432,7 +432,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
if component then
if self.hasWeaponComponent(weaponName, weaponComponent) then
for k,v in ipairs(self.loadout[loadoutNum].components) do
if v.name == weaponComponent then
if v == weaponComponent then
table.remove(self.loadout[loadoutNum].components, k)
break
end