diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-14 22:43:22 +0200 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-14 22:43:28 +0200 |
commit | 3560f0de082a8950a84e2e866981f8bdfd05428a (patch) | |
tree | dfb765f7e590189f05e7807c80be72e6ecf8cc4d /src/mapblockobject.cpp | |
parent | 5146c826be9386cc2adeb8f678063a2f9cfc1dee (diff) | |
parent | 81535f6277b66c869cda7125b2aeaf99e8078b92 (diff) | |
download | minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.tar.gz minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.tar.bz2 minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.zip |
Merge branch 'upstream/master'
Conflicts:
data/oerkki1.png
src/client.cpp
Diffstat (limited to 'src/mapblockobject.cpp')
-rw-r--r-- | src/mapblockobject.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mapblockobject.cpp b/src/mapblockobject.cpp index 009163a18..ab1c20267 100644 --- a/src/mapblockobject.cpp +++ b/src/mapblockobject.cpp @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "map.h" #include "inventory.h" #include "utility.h" +#include "mapblock.h" /* MapBlockObject @@ -856,16 +857,7 @@ bool MapBlockObjectList::wrapObject(MapBlockObject *object) assert(m_objects.find(object->m_id) != NULL); assert(m_objects[object->m_id] == object); - NodeContainer *parentcontainer = m_block->getParent(); - // This will only work if the parent is the map - if(parentcontainer->nodeContainerId() != NODECONTAINER_ID_MAP) - { - dstream<<"WARNING: Wrapping object not possible: " - "MapBlock's parent is not map"<<std::endl; - return true; - } - // OK, we have the map! - Map *map = (Map*)parentcontainer; + Map *map = m_block->getParent(); // Calculate blockpos on map v3s16 oldblock_pos_i_on_map = m_block->getPosRelative(); |