| 1086 | |
| 1087 | |
| 1088 | bool cChunk::UnboundedRelGetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) const |
| 1089 | { |
| 1090 | if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height)) |
| 1091 | { |
| 1092 | LOGWARNING("%s: requesting a block with a_RelY out of range: %d", __FUNCTION__, a_RelY); |
| 1093 | return false; |
| 1094 | } |
| 1095 | cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ); |
| 1096 | if ((Chunk == NULL) || !Chunk->IsValid()) |
| 1097 | { |
| 1098 | // The chunk is not available, bail out |
| 1099 | return false; |
| 1100 | } |
| 1101 | Chunk->GetBlockTypeMeta(a_RelX, a_RelY, a_RelZ, a_BlockType, a_BlockMeta); |
| 1102 | return true; |
| 1103 | } |
| 1104 | |
| 1105 | |
| 1106 |
no test coverage detected