From 1cca9b13b3d320ff767cfc552413265b2ef6e0d6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 6 Jun 2012 20:18:50 +0000 Subject: Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool. git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cFurnaceEntity.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/cFurnaceEntity.cpp') diff --git a/source/cFurnaceEntity.cpp b/source/cFurnaceEntity.cpp index 4e831cdff..925682590 100644 --- a/source/cFurnaceEntity.cpp +++ b/source/cFurnaceEntity.cpp @@ -58,15 +58,16 @@ cFurnaceEntity::~cFurnaceEntity() void cFurnaceEntity::Destroy() { // Drop items + cItems Pickups; for( int i = 0; i < 3; i++) { if( !m_Items[i].IsEmpty() ) { - cPickup* Pickup = new cPickup( m_PosX * 32 + 16, m_PosY * 32 + 16, m_PosZ * 32 + 16, m_Items[i], 0, 1.f, 0 ); - Pickup->Initialize(m_World); + Pickups.push_back(m_Items[i]); m_Items[i].Empty(); } } + m_World->SpawnItemPickups(Pickups, m_PosX, m_PosY, m_PosZ); } -- cgit v1.2.3