1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Some refactoring and fixes to VoxelArea and VoxelManip

In particular this validates the edges of VoxelArea and fixes
all the nonsense tests uncovered by it.
This commit is contained in:
sfan5 2024-10-07 17:48:19 +02:00
parent 5532248cd7
commit 6d5103900f
11 changed files with 178 additions and 183 deletions

View file

@ -178,13 +178,13 @@ void MapBlock::copyTo(VoxelManipulator &dst)
getPosRelative(), data_size);
}
void MapBlock::copyFrom(VoxelManipulator &dst)
void MapBlock::copyFrom(const VoxelManipulator &src)
{
v3s16 data_size(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE);
VoxelArea data_area(v3s16(0,0,0), data_size - v3s16(1,1,1));
// Copy from VoxelManipulator to data
dst.copyTo(data, data_area, v3s16(0,0,0),
src.copyTo(data, data_area, v3s16(0,0,0),
getPosRelative(), data_size);
}