summaryrefslogtreecommitdiffstats
path: root/source/Pickup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Pickup.cpp')
-rw-r--r--source/Pickup.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/Pickup.cpp b/source/Pickup.cpp
index ea1f603a4..7ea730708 100644
--- a/source/Pickup.cpp
+++ b/source/Pickup.cpp
@@ -256,12 +256,16 @@ bool cPickup::CollectedBy( cPlayer* a_Dest )
return false;
}
- if (a_Dest->GetInventory().AddItem(*m_Item))
+ if (a_Dest->GetInventory().AddItemAnyAmount(*m_Item))
{
m_World->BroadcastCollectPickup(*this, *a_Dest);
-
m_bCollected = true;
m_Timer = 0;
+ if( m_Item->m_ItemCount != 0 ) {
+ cItems Pickup;
+ Pickup.push_back(cItem(*m_Item));
+ m_World->SpawnItemPickups(Pickup, m_Pos.x, m_Pos.y, m_Pos.z);
+ }
return true;
}