| 1214 | |
| 1215 | |
| 1216 | bool cChunk::UnboundedRelSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| 1217 | { |
| 1218 | if ((a_RelY < 0) || (a_RelY > cChunkDef::Height)) |
| 1219 | { |
| 1220 | LOGWARNING("UnboundedRelSetBlock(): requesting a block with a_RelY out of range: %d", a_RelY); |
| 1221 | return false; |
| 1222 | } |
| 1223 | cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ); |
| 1224 | if ((Chunk == NULL) || !Chunk->IsValid()) |
| 1225 | { |
| 1226 | // The chunk is not available, bail out |
| 1227 | return false; |
| 1228 | } |
| 1229 | Chunk->SetBlock(a_RelX, a_RelY, a_RelZ, a_BlockType, a_BlockMeta); |
| 1230 | return true; |
| 1231 | } |
| 1232 | |
| 1233 | |
| 1234 |
no test coverage detected