summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-01 13:41:20 +0200
committerMattes D <github@xoft.cz>2014-09-01 13:41:20 +0200
commit74204aed6c4be6ef37194b7f317671a3f03f1247 (patch)
tree98c7825ebf9853cab02300f53d2fc5b25d3ba4cd /src/BlockEntities
parentMerge pull request #1363 from mc-server/FurnaceRecipes (diff)
parentFixed style. (diff)
downloadcuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar.gz
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar.bz2
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar.lz
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar.xz
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.tar.zst
cuberite-74204aed6c4be6ef37194b7f317671a3f03f1247.zip
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp
index dd0858378..20702a9ac 100644
--- a/src/BlockEntities/CommandBlockEntity.cpp
+++ b/src/BlockEntities/CommandBlockEntity.cpp
@@ -188,12 +188,11 @@ void cCommandBlockEntity::SaveToJson(Json::Value & a_Value)
void cCommandBlockEntity::Execute()
{
- if (m_World != NULL)
+ ASSERT(m_World != NULL); // Execute should not be called before the command block is attached to a world
+
+ if (!m_World->AreCommandBlocksEnabled())
{
- if (!m_World->AreCommandBlocksEnabled())
- {
- return;
- }
+ return;
}
class CommandBlockOutCb :