| 163 | |
| 164 | |
| 165 | cChunkPtr cChunkMap::GetChunkNoGen( int a_ChunkX, int a_ChunkY, int a_ChunkZ ) |
| 166 | { |
| 167 | // No need to lock m_CSLayers, since it's already locked by the operation that called us |
| 168 | cChunkLayer * Layer = GetLayerForChunk( a_ChunkX, a_ChunkZ ); |
| 169 | if (Layer == NULL) |
| 170 | { |
| 171 | // An error must have occurred, since layers are automatically created if they don't exist |
| 172 | return NULL; |
| 173 | } |
| 174 | |
| 175 | cChunkPtr Chunk = Layer->GetChunk(a_ChunkX, a_ChunkY, a_ChunkZ); |
| 176 | if (Chunk == NULL) |
| 177 | { |
| 178 | return NULL; |
| 179 | } |
| 180 | if (!(Chunk->IsValid())) |
| 181 | { |
| 182 | m_World->GetStorage().QueueLoadChunk(a_ChunkX, a_ChunkY, a_ChunkZ, false); |
| 183 | } |
| 184 | |
| 185 | return Chunk; |
| 186 | } |
| 187 | |
| 188 | |
| 189 |
nothing calls this directly
no test coverage detected