summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-02 14:49:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-02 14:49:35 +0300
commit12a366099b803264ccb2066d056ac17bd52d55d6 (patch)
tree32c49f64fba89bf47b14e70b042cbd23600628b6 /hercules
parent81ae620e5b82507c7232f8d659ddb0d9e8ebc6dd (diff)
downloadevol-tools-12a366099b803264ccb2066d056ac17bd52d55d6.tar.gz
evol-tools-12a366099b803264ccb2066d056ac17bd52d55d6.tar.bz2
evol-tools-12a366099b803264ccb2066d056ac17bd52d55d6.tar.xz
evol-tools-12a366099b803264ccb2066d056ac17bd52d55d6.zip
hercules: fix creating map cached from broken collision layer in tmx.
Diffstat (limited to 'hercules')
-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 c64f6af..6742456 100644
--- a/hercules/code/clienttoserver/maps.py
+++ b/hercules/code/clienttoserver/maps.py
@@ -76,6 +76,8 @@ def recreateMapCache():
tileType = 0
else:
tileType = tile - firstgid;
+ if tileType > 128 or tileType < 0:
+ tileType = 1
tiles.append(tileType)
elif encoding == "csv":
binData = data.childNodes[0].data.strip()
@@ -107,6 +109,8 @@ def recreateMapCache():
# 101 5 - shootable
# 110 6 - same with 0
# 111 7 - none
+ if tileType > 128 or tileType < 0:
+ tileType = 1
tiles.append(tileType)
except:
None