| 605 | #ifdef _DEBUG |
| 606 | |
| 607 | void cChunkDesc::VerifyHeightmap(void) |
| 608 | { |
| 609 | for (int x = 0; x < cChunkDef::Width; x++) |
| 610 | { |
| 611 | for (int z = 0; z < cChunkDef::Width; z++) |
| 612 | { |
| 613 | for (int y = cChunkDef::Height - 1; y > 0; y--) |
| 614 | { |
| 615 | BLOCKTYPE BlockType = GetBlockType(x, y, z); |
| 616 | if (BlockType != E_BLOCK_AIR) |
| 617 | { |
| 618 | int Height = GetHeight(x, z); |
| 619 | ASSERT(Height == y); |
| 620 | break; |
| 621 | } |
| 622 | } // for y |
| 623 | } // for z |
| 624 | } // for x |
| 625 | } |
| 626 | |
| 627 | #endif // _DEBUG |
| 628 |