1
0

Bed piston fix (#3956)

* Threaded world interface into ConvertBlockToPickups

* Changed how cBlockPiston::PushBlocks sets the old block to air, so that the block exists for the DropBlock call.

* Removed unused a_Digger argument.

* Removed incorrect comment

* This time actually removed a_Digger references.
This commit is contained in:
Lane Kolbly
2017-08-25 04:56:01 -05:00
committed by Alexander Harkness
parent b55e5f5ad1
commit 87c89a1727
7 changed files with 13 additions and 10 deletions

View File

@@ -209,7 +209,7 @@ void cBlockBedHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWor
void cBlockBedHandler::ConvertToPickups(cEntity * a_Digger, cItems & a_Pickups, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ)
void cBlockBedHandler::ConvertToPickups(cWorldInterface & a_WorldInterface, cItems & a_Pickups, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ)
{
class cBedColor :
public cBedCallback
@@ -224,6 +224,6 @@ void cBlockBedHandler::ConvertToPickups(cEntity * a_Digger, cItems & a_Pickups,
}
};
cBedColor BedCallback;
a_Digger->GetWorld()->DoWithBedAt(a_BlockX, a_BlockY, a_BlockZ, BedCallback);
a_WorldInterface.DoWithBedAt(a_BlockX, a_BlockY, a_BlockZ, BedCallback);
a_Pickups.Add(cItem(E_ITEM_BED, 1, BedCallback.m_Color));
}