Added IsBlockWaterOrIce()

This commit is contained in:
Tiger Wang
2014-02-02 21:48:21 +00:00
parent d9a9052de7
commit 0f67f80c6e
2 changed files with 12 additions and 10 deletions
+11 -9
View File
@@ -254,16 +254,18 @@ inline bool IsValidItem(int a_ItemType)
inline bool IsBlockWater(BLOCKTYPE a_BlockType, bool a_IncludeFrozenWater = false)
inline bool IsBlockWater(BLOCKTYPE a_BlockType)
{
if (a_IncludeFrozenWater)
{
return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER) || (a_BlockType == E_BLOCK_ICE));
}
else
{
return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER));
}
return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER));
}
inline bool IsBlockWaterOrIce(BLOCKTYPE a_BlockType)
{
return (IsBlockWater(a_BlockType) || (a_BlockType == E_BLOCK_ICE));
}