mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 18:05:22 +02:00
MapBlock::getData be gone (#16292)
* Remove Mapblock::getData and all its uses * Do not leak ystride, zstride, and nodecount
This commit is contained in:
@@ -31,9 +31,11 @@ public:
|
||||
for (s16 y = bpmin.Y; y <= bpmax.Y; y++) {
|
||||
MapBlock *block = getBlockNoCreateNoEx({x, y, z});
|
||||
if (block) {
|
||||
auto *data = block->getData();
|
||||
for (size_t i = 0; i < MapBlock::nodecount; i++)
|
||||
data[i] = n;
|
||||
for (s16 zn=0; zn < MAP_BLOCKSIZE; zn++)
|
||||
for (s16 yn=0; yn < MAP_BLOCKSIZE; yn++)
|
||||
for (s16 xn=0; xn < MAP_BLOCKSIZE; xn++) {
|
||||
block->setNodeNoCheck(xn, yn, zn, n);
|
||||
}
|
||||
block->expireIsAirCache();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user