diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-26 10:47:30 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-26 10:47:30 +0200 |
commit | 403ef6bcdce65a1fd44bd00a0b1c83cee84b7076 (patch) | |
tree | 0ec0d77ad89ccd59d0f30b677c5cbd101824a67d /source/ChunkMap.cpp | |
parent | Fixed up a few valgrind warnings (diff) | |
download | cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar.gz cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar.bz2 cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar.lz cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar.xz cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.tar.zst cuberite-403ef6bcdce65a1fd44bd00a0b1c83cee84b7076.zip |
Diffstat (limited to 'source/ChunkMap.cpp')
-rw-r--r-- | source/ChunkMap.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp index 06b1d9039..bad47b066 100644 --- a/source/ChunkMap.cpp +++ b/source/ChunkMap.cpp @@ -972,7 +972,7 @@ void cChunkMap::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_B -void cChunkMap::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) +bool cChunkMap::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) { int ChunkX, ChunkZ, X = a_BlockX, Y = a_BlockY, Z = a_BlockZ; cChunkDef::AbsoluteToRelative( X, Y, Z, ChunkX, ChunkZ ); @@ -982,14 +982,16 @@ void cChunkMap::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCK if ((Chunk != NULL) && Chunk->IsValid()) { Chunk->GetBlockTypeMeta(X, Y, Z, a_BlockType, a_BlockMeta); + return true; } + return false; } -void cChunkMap::GetBlockInfo(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight) +bool cChunkMap::GetBlockInfo(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight) { int ChunkX, ChunkZ, X = a_BlockX, Y = a_BlockY, Z = a_BlockZ; cChunkDef::AbsoluteToRelative( X, Y, Z, ChunkX, ChunkZ ); @@ -999,7 +1001,9 @@ void cChunkMap::GetBlockInfo(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE if ((Chunk != NULL) && Chunk->IsValid()) { Chunk->GetBlockInfo(X, Y, Z, a_BlockType, a_Meta, a_SkyLight, a_BlockLight); + return true; } + return false; } |