From f8d51102905a5131d23b331a61dbc226a9d4fe6e Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Tue, 21 May 2024 04:30:43 -0700 Subject: [PATCH] Update PropertyManagementComponent.cpp Revert "fix stale reference" This reverts commit 03b17c0374787bca6dfec2da663da74ac76c26fb. fix stale reference --- dGame/dComponents/PropertyManagementComponent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dGame/dComponents/PropertyManagementComponent.cpp b/dGame/dComponents/PropertyManagementComponent.cpp index 6f51ba01..8fd8af22 100644 --- a/dGame/dComponents/PropertyManagementComponent.cpp +++ b/dGame/dComponents/PropertyManagementComponent.cpp @@ -534,6 +534,7 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet inventoryComponent->AddItem(model->GetLOT(), 1, eLootSourceType::DELETION, INVALID, model->GetSettings(), LWOOBJID_EMPTY, false); + // figure out how to get the actual item we picked up instead of just the first lot we find auto* item = inventoryComponent->FindItemByLot(model->GetLOT()); if (item == nullptr) {