1
0

Don't remove items twice (#4524)

* Don't remove items twice
This commit is contained in:
Mat
2020-03-22 12:17:04 +02:00
committed by GitHub
parent 038194d2a6
commit 49dd645aa6
11 changed files with 16 additions and 19 deletions

View File

@@ -145,7 +145,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
// Do not add the arrow to the inventory when the player is in creative:
if (!a_Dest.IsGameModeCreative())
{
int NumAdded = a_Dest.GetInventory().AddItem(E_ITEM_ARROW);
int NumAdded = a_Dest.GetInventory().AddItem(cItem(E_ITEM_ARROW));
if (NumAdded == 0)
{
// No space in the inventory