diff options
author | Weblate <42@minetest.ru> | 2013-02-28 18:03:28 +0100 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-02-28 18:03:28 +0100 |
commit | 22e186b4aa88b585e71500c4e9a03bf69b0b6191 (patch) | |
tree | 14c5b7a73cf144ba7cf3066caac088a200f81a72 /src/voxel.cpp | |
parent | 372acf7b8eca0614a4a0da93cfbaccbcd459b36b (diff) | |
parent | d31f07bd4b83f858cce589faac56922e12ba670f (diff) | |
download | minetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.tar.gz minetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.tar.bz2 minetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'src/voxel.cpp')
-rw-r--r-- | src/voxel.cpp | 12 |
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)); } } |