summaryrefslogtreecommitdiff
path: root/src/mapblockobject.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-14 22:43:22 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-14 22:43:28 +0200
commitaf05e4b2defde537f3b953a7dae0ef44fae225aa (patch)
tree3f751014432b35df1cc2fd6fb976410e86b70e73 /src/mapblockobject.cpp
parent4415d95c503f083d871abaf84516f2b6487ecb60 (diff)
parent81535f6277b66c869cda7125b2aeaf99e8078b92 (diff)
downloadminetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.tar.gz
minetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.tar.bz2
minetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.zip
Merge branch 'upstream/master'
Conflicts: data/oerkki1.png src/client.cpp
Diffstat (limited to 'src/mapblockobject.cpp')
-rw-r--r--src/mapblockobject.cpp12
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();