diff options
author | kwolekr <mirrorisim@gmail.com> | 2013-02-21 22:26:21 -0500 |
---|---|---|
committer | kwolekr <mirrorisim@gmail.com> | 2013-02-25 23:08:55 -0500 |
commit | 5bd50a2d9060f265d4c8d2fff062cac106ccab7c (patch) | |
tree | 8605b7df87bb03e94ae07343505013a6818c6ee5 /src/voxel.cpp | |
parent | 60e6284f30d31e11c1a464d9a8b3c5c392ceb3f0 (diff) | |
download | hax-minetest-server-5bd50a2d9060f265d4c8d2fff062cac106ccab7c.tar.gz hax-minetest-server-5bd50a2d9060f265d4c8d2fff062cac106ccab7c.zip |
Fix most walled-off caves
Diffstat (limited to 'src/voxel.cpp')
-rw-r--r-- | src/voxel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/voxel.cpp b/src/voxel.cpp index 0ff5305fa..c55f3f539 100644 --- a/src/voxel.cpp +++ b/src/voxel.cpp @@ -244,7 +244,13 @@ void VoxelManipulator::copyTo(MapNode *dst, VoxelArea dst_area, { s32 i_dst = dst_area.index(dst_pos.X, dst_pos.Y+y, dst_pos.Z+z); s32 i_local = m_area.index(from_pos.X, from_pos.Y+y, from_pos.Z+z); - memcpy(&dst[i_dst], &m_data[i_local], size.X*sizeof(MapNode)); + for (s16 x = 0; x < size.X; x++) { + if (m_data[i_local].getContent() != CONTENT_IGNORE) + dst[i_dst] = m_data[i_local]; + i_dst++; + i_local++; + } + //memcpy(&dst[i_dst], &m_data[i_local], size.X*sizeof(MapNode)); } } |