1
0

DungeonRooms: Replaced explicit switch with CanBeTerraformed().

This commit is contained in:
Mattes D 2014-08-26 17:13:46 +03:00
parent 98974412fa
commit 2d569ce6dd

View File

@ -114,18 +114,10 @@ protected:
{
for (int x = RelStartX; x < RelEndX; x++)
{
switch (a_ChunkDesc.GetBlockType(x, y, z))
if (cBlockInfo::CanBeTerraformed(a_ChunkDesc.GetBlockType(x, y, z)))
{
case E_BLOCK_STONE:
case E_BLOCK_DIRT:
case E_BLOCK_GRASS:
case E_BLOCK_GRAVEL:
case E_BLOCK_SAND:
{
a_ChunkDesc.SetBlockType(x, y, z, a_DstBlockType);
break;
}
} // switch (GetBlockType)
a_ChunkDesc.SetBlockType(x, y, z, a_DstBlockType);
}
} // for x
} // for z
} // for z