1
0

DropSpensers: Fixed activation when receiving redstone signal. Now only one item is dropspensed.

Fix for FS #378, http://www.mc-server.org/support/index.php?do=details&task_id=378

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1521 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-05-27 17:28:42 +00:00
parent edbc2790e3
commit 9b8dff31e6
3 changed files with 33 additions and 14 deletions

View File

@@ -14,7 +14,8 @@
cDropSpenserEntity::cDropSpenserEntity(BLOCKTYPE a_BlockType, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) :
super(a_BlockType, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World),
m_ShouldDropSpense(false)
m_ShouldDropSpense(false),
m_IsPowered(false)
{
SetBlockEntity(this); // cBlockEntityWindowOwner
}
@@ -120,6 +121,19 @@ void cDropSpenserEntity::Activate(void)
void cDropSpenserEntity::SetRedstonePower(bool a_IsPowered)
{
if (a_IsPowered && !m_IsPowered)
{
Activate();
}
m_IsPowered = a_IsPowered;
}
bool cDropSpenserEntity::Tick(float a_Dt)
{
if (!m_ShouldDropSpense)