summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exporter.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/exporter.py b/src/exporter.py
index eeca252..e2ee9ae 100644
--- a/src/exporter.py
+++ b/src/exporter.py
@@ -192,7 +192,7 @@ class KPMapExporter:
sectorData = self._packSectorData(sectors)
# now that we've got that, we can pack the first part of the file
- version = 1
+ version = 2
headerSize = 0x2C
tsInfoOffsetInHeader = 0x10
data = bytearray(struct.pack('>4sIIIIIIIIII', 'KP_m', version, len(self.layers), headerSize + len(sectorData), 0, 0, 0, headerSize, 0, 0, len(self.map.worlds)))
@@ -362,6 +362,12 @@ class KPMapExporter:
# i i i b b b b: isNew, Extra pointer, dest map, map ID, foreign ID, transition, padding
data += struct.pack('>iiibbbb', 0, 0, 0, node.mapID, node.foreignID, node.transition, 0)
+ elif node.worldDefID:
+ data += u32.pack(4) # node type
+
+ # b b b b: world def ID, padding
+ data += struct.pack('>bbbb', node.worldDefID, 0, 0, 0)
+
else:
data += u32.pack(1) # node type
data += zero32 # isNew