In components/banditmanager.lua line 71-106
function Banditmanager:deactivatebandit(bandit,killed) self.banditactive = nil local loot = bandit.components.inventory:GetItems(function(k,v) local ok = false if v.oincvalue then ok = true end return ok end) if killed then --self.loot = {} self.deathtime = self.deathtimeMax self.bandit = nil else bandit.components.health:SetPercent(1) bandit.attacked = nil for i,item in ipairs(loot)do bandit.components.inventory:RemoveItem(item,true) if not self.loot[item.prefab] then if item.components.stackable then self.loot[item.prefab] = item.components.stackable:StackSize() else self.loot[item.prefab] = 1 end else if item.components.stackable then self.loot[item.prefab] = self.loot[item.prefab] + item.components.stackable:StackSize() else self.loot[item.prefab] = self.loot[item.prefab] + 1 end end end end end
Here, oincs on the Masked Pig are removed from its inventory with inventory:RemoveItem, however that method does not delete the item, instead those oincs are left at (0, 0, 0)
Steps to Reproduce
The above
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now