diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-04-26 19:50:23 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-04-26 19:50:23 +0200 |
commit | e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0 (patch) | |
tree | 8cb2098da03ec8c2d66f8f36a53e4cf4280b554a /src/ChunkMap.cpp | |
parent | Replaced all the .data() calls so the code compiles in VS2008 (diff) | |
download | cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar.gz cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar.bz2 cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar.lz cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar.xz cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.tar.zst cuberite-e40f9d6e5b93e840e3d67e79f5ba49da1fbb75f0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index e695f0ab2..2b47f25f8 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -219,9 +219,8 @@ bool cChunkMap::LockedGetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTY return false; } - int Index = cChunkDef::MakeIndexNoCheck(a_BlockX, a_BlockY, a_BlockZ); - a_BlockType = Chunk->GetBlock(Index); - a_BlockMeta = Chunk->GetMeta(Index); + a_BlockType = Chunk->GetBlock(a_BlockX, a_BlockY, a_BlockZ); + a_BlockMeta = Chunk->GetMeta(a_BlockX, a_BlockY, a_BlockZ); return true; } @@ -242,8 +241,7 @@ bool cChunkMap::LockedGetBlockType(int a_BlockX, int a_BlockY, int a_BlockZ, BLO return false; } - int Index = cChunkDef::MakeIndexNoCheck(a_BlockX, a_BlockY, a_BlockZ); - a_BlockType = Chunk->GetBlock(Index); + a_BlockType = Chunk->GetBlock(a_BlockX, a_BlockY, a_BlockZ); return true; } @@ -264,8 +262,7 @@ bool cChunkMap::LockedGetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIB return false; } - int Index = cChunkDef::MakeIndexNoCheck(a_BlockX, a_BlockY, a_BlockZ); - a_BlockMeta = Chunk->GetMeta(Index); + a_BlockMeta = Chunk->GetMeta(a_BlockX, a_BlockY, a_BlockZ); return true; } @@ -1486,9 +1483,8 @@ bool cChunkMap::GetBlocks(sSetBlockVector & a_Blocks, bool a_ContinueOnFailure) res = false; continue; } - int idx = cChunkDef::MakeIndexNoCheck(itr->x, itr->y, itr->z); - itr->BlockType = Chunk->GetBlock(idx); - itr->BlockMeta = Chunk->GetMeta(idx); + itr->BlockType = Chunk->GetBlock(itr->x, itr->y, itr->z); + itr->BlockMeta = Chunk->GetMeta(itr->x, itr->y, itr->z); } return res; } |