1
0

Explosions do not effect the terrain when they are in water.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1608 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
nielsbreu@gmail.com 2013-06-18 20:32:22 +00:00
parent 73fb71e164
commit bcfa09aa14

View File

@ -1499,6 +1499,17 @@ bool cChunkMap::ForEachEntityInChunk(int a_ChunkX, int a_ChunkZ, cEntityCallback
void cChunkMap::DoExplosiontAt(float a_ExplosionSize, int a_BlockX, int a_BlockY, int a_BlockZ, cVector3iArray & a_BlocksAffected)
{
switch (m_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ))
// Check if the explosion is in a liquid.
{
case E_BLOCK_WATER:
case E_BLOCK_STATIONARY_WATER:
case E_BLOCK_LAVA:
case E_BLOCK_STATIONARY_LAVA:
{
return;
}
}
cBlockArea area;
int ExplosionSizeInt = (int) ceil(a_ExplosionSize);
int ExplosionSizeSq = ExplosionSizeInt * ExplosionSizeInt;