| 1191 | |
| 1192 | |
| 1193 | bool cChunk::UnboundedRelGetBlockLights(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE & a_BlockLight, NIBBLETYPE & a_SkyLight) const |
| 1194 | { |
| 1195 | if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height)) |
| 1196 | { |
| 1197 | LOGWARNING("%s: requesting a block with a_RelY out of range: %d", __FUNCTION__, a_RelY); |
| 1198 | return false; |
| 1199 | } |
| 1200 | cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ); |
| 1201 | if ((Chunk == NULL) || !Chunk->IsValid()) |
| 1202 | { |
| 1203 | // The chunk is not available, bail out |
| 1204 | return false; |
| 1205 | } |
| 1206 | int idx = Chunk->MakeIndex(a_RelX, a_RelY, a_RelZ); |
| 1207 | a_BlockLight = Chunk->GetBlockLight(idx); |
| 1208 | a_SkyLight = Chunk->GetSkyLight(idx); |
| 1209 | return true; |
| 1210 | } |
| 1211 | |
| 1212 | |
| 1213 |
nothing calls this directly
no test coverage detected