summaryrefslogtreecommitdiff
path: root/hercules/code/clienttoserver/maps.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/clienttoserver/maps.py')
-rw-r--r--hercules/code/clienttoserver/maps.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/hercules/code/clienttoserver/maps.py b/hercules/code/clienttoserver/maps.py
index 6742456..b138642 100644
--- a/hercules/code/clienttoserver/maps.py
+++ b/hercules/code/clienttoserver/maps.py
@@ -46,6 +46,7 @@ def recreateMapCache():
firstgid = int(tileset.attributes["firstgid"].value)
break
+ found = False
for layer in root.getElementsByTagName("layer"):
if layer.attributes["name"].value == "Collision":
data = layer.getElementsByTagName("data")
@@ -132,7 +133,10 @@ def recreateMapCache():
print fileName
mapsCount = mapsCount + 1
sz = sz + 12 + 8 + len(binData)
+ found = True
break
+ if found == False:
+ print "Error: missing collision layer in file: {0}".format(fileName)
w.seek(0);
writeInt32(w, sz)
writeInt16(w, mapsCount)