summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index d8ed29106..21e3dbd6c 100644
--- a/src/map.h
+++ b/src/map.h
@@ -446,10 +446,25 @@ public:
void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks,
bool overwrite_generated = true);
+ /*
+ Creates a copy of this VManip including contents, the copy will not be
+ associated with a Map.
+ */
+ MMVManip *clone() const;
+
+ // Reassociates a copied VManip to a map
+ void reparent(Map *map);
+
+ // Is it impossible to call initialEmerge / blitBackAll?
+ inline bool isOrphan() const { return !m_map; }
+
bool m_is_dirty = false;
protected:
- Map *m_map;
+ MMVManip() {};
+
+ // may be null
+ Map *m_map = nullptr;
/*
key = blockpos
value = flags describing the block