summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-30 22:24:04 +0200
committermadmaxoft <github@xoft.cz>2014-08-30 22:24:04 +0200
commitdb663c7ee1737f5e03c0bce6584933123b9d58e3 (patch)
treea6ad2990fdaff104c3663a8655be26ad55dc1ccc
parentMerge branch 'master' into fixes (diff)
downloadcuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.gz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.bz2
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.lz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.xz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.zst
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp5
-rw-r--r--src/ChunkMap.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp
index fe2f5e60a..dd0858378 100644
--- a/src/BlockEntities/CommandBlockEntity.cpp
+++ b/src/BlockEntities/CommandBlockEntity.cpp
@@ -211,13 +211,14 @@ void cCommandBlockEntity::Execute()
}
} CmdBlockOutCb(this);
- if ( // Administrator commands are not executable by command blocks
+ // Administrator commands are not executable by command blocks:
+ if (
(m_Command != "stop") &&
(m_Command != "restart") &&
(m_Command != "kick") &&
(m_Command != "ban") &&
(m_Command != "ipban")
- )
+ )
{
cServer * Server = cRoot::Get()->GetServer();
LOGD("cCommandBlockEntity: Executing command %s", m_Command.c_str());
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 8ca61e2cf..a3692ef11 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1880,10 +1880,11 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
}
else if ((m_World->GetTNTShrapnelLevel() > slNone) && (m_World->GetTickRandomNumber(100) < 20)) // 20% chance of flinging stuff around
{
+ // If the block is shrapnel-able, make a falling block entity out of it:
if (
((m_World->GetTNTShrapnelLevel() == slAll) && cBlockInfo::FullyOccupiesVoxel(Block)) ||
((m_World->GetTNTShrapnelLevel() == slGravityAffectedOnly) && ((Block == E_BLOCK_SAND) || (Block == E_BLOCK_GRAVEL)))
- )
+ )
{
m_World->SpawnFallingBlock(bx + x, by + y + 5, bz + z, Block, area.GetBlockMeta(bx + x, by + y, bz + z));
}
@@ -1891,7 +1892,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
area.SetBlockTypeMeta(bx + x, by + y, bz + z, E_BLOCK_AIR, 0);
a_BlocksAffected.push_back(Vector3i(bx + x, by + y, bz + z));
- break;
+ break;
}
} // switch (BlockType)
} // for z