summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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