diff options
Diffstat (limited to 'source/DropSpenserEntity.cpp')
-rw-r--r-- | source/DropSpenserEntity.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/DropSpenserEntity.cpp b/source/DropSpenserEntity.cpp index 3830e1d01..85eaa8297 100644 --- a/source/DropSpenserEntity.cpp +++ b/source/DropSpenserEntity.cpp @@ -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)
|