summaryrefslogtreecommitdiff
path: root/src/voxel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/voxel.cpp')
-rw-r--r--src/voxel.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/voxel.cpp b/src/voxel.cpp
index 8fdae79e1..c55f3f539 100644
--- a/src/voxel.cpp
+++ b/src/voxel.cpp
@@ -1,6 +1,6 @@
/*
-Minetest-c55
-Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -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));
}
}