1
0

Fixed spawning pickups with piston arms

This commit is contained in:
Tiger Wang 2013-11-22 21:57:06 +00:00
parent 314884d9bb
commit c7d55d8bbd

View File

@ -93,6 +93,11 @@ void cBlockPistonHeadHandler::OnDestroyedByPlayer(cWorld * a_World, cPlayer * a_
if ((Block == E_BLOCK_STICKY_PISTON) || (Block == E_BLOCK_PISTON))
{
a_World->DigBlock(newX, newY, newZ);
if (a_Player->IsGameModeCreative()) { return; } // No pickups if creative
cItems Pickups;
Pickups.push_back(cItem(Block, 1));
a_World->SpawnItemPickups(Pickups, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5);
}
}