summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-27 06:23:02 +0200
committerTreeki <treeki@gmail.com>2012-09-27 06:23:02 +0200
commit166fc64dbea79897cc702770ca33a8e1c57a124f (patch)
treed8505509db6cd28743fb8b4fe99a5539d85b9204
parent2b5684ece946c0567db5b4431449f90883919800 (diff)
downloadkoopatlas-166fc64dbea79897cc702770ca33a8e1c57a124f.tar.gz
koopatlas-166fc64dbea79897cc702770ca33a8e1c57a124f.zip
final fixes to exporter
-rw-r--r--src/exporter.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/exporter.py b/src/exporter.py
index e2ee9ae..ce87a12 100644
--- a/src/exporter.py
+++ b/src/exporter.py
@@ -362,16 +362,15 @@ 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
data += zero32 # Extra pointer
+
+ elif node.worldDefID:
+ # i i i b b b b: node type, isNew, Extra pointer, world def ID, padding
+ data += struct.pack('>iiibbbb', 4, 0, 0, node.worldDefID, 0, 0, 0)
+
else:
data += zero32 # node type
data += zero32 # isNew