| 565 | |
| 566 | |
| 567 | void cChunkDesc::UpdateHeightmap(void) |
| 568 | { |
| 569 | for (int x = 0; x < cChunkDef::Width; x++) |
| 570 | { |
| 571 | for (int z = 0; z < cChunkDef::Width; z++) |
| 572 | { |
| 573 | int Height = 0; |
| 574 | for (int y = cChunkDef::Height - 1; y > 0; y--) |
| 575 | { |
| 576 | BLOCKTYPE BlockType = GetBlockType(x, y, z); |
| 577 | if (BlockType != E_BLOCK_AIR) |
| 578 | { |
| 579 | Height = y; |
| 580 | break; |
| 581 | } |
| 582 | } // for y |
| 583 | SetHeight(x, z, Height); |
| 584 | } // for z |
| 585 | } // for x |
| 586 | } |
| 587 | |
| 588 | |
| 589 |
no outgoing calls
no test coverage detected