Skip to content

Commit

Permalink
init (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogidevs authored Mar 31, 2024
1 parent af7002d commit 87de962
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/cl_property.lua
Original file line number Diff line number Diff line change
Expand Up @@ -486,18 +486,17 @@ function Property:UnloadFurniture(furniture, index)
end
end

if index and self.furnitureObjs?[index] then
table.remove(self.furnitureObjs, index)
else
SetEntityAsMissionEntity(entity, true, true)
DeleteEntity(entity)

if not index then
for i = 1, #self.furnitureObjs do
if self.furnitureObjs[i]?.id and furniture?.id and self.furnitureObjs[i].id == furniture.id then
table.remove(self.furnitureObjs, i)
break
end
end
end

DeleteObject(entity)
end

function Property:UnloadFurnitures()
Expand Down

0 comments on commit 87de962

Please sign in to comment.