Skip to content

Commit

Permalink
Prevent container item duplication (cuberite#4476)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiascode authored Mar 4, 2020
1 parent 1ab87be commit aba3295
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/BlockEntities/BlockEntityWithItems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ cBlockEntityWithItems::cBlockEntityWithItems(



void cBlockEntityWithItems::Destroy(void)
{
// Drop the contents as pickups:
ASSERT(m_World != nullptr);
cItems Pickups;
m_Contents.CopyToItems(Pickups);
m_Contents.Clear();
m_World->SpawnItemPickups(Pickups, m_Pos.x + 0.5, m_Pos.y + 0.5, m_Pos.z + 0.5); // Spawn in centre of block
}





void cBlockEntityWithItems::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Expand Down
1 change: 0 additions & 1 deletion src/BlockEntities/BlockEntityWithItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class cBlockEntityWithItems :
);

// cBlockEntity overrides:
virtual void Destroy(void) override;
virtual void CopyFrom(const cBlockEntity & a_Src) override;

// tolua_begin
Expand Down

0 comments on commit aba3295

Please sign in to comment.