From 12a366099b803264ccb2066d056ac17bd52d55d6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 Feb 2016 14:49:35 +0300 Subject: hercules: fix creating map cached from broken collision layer in tmx. --- hercules/code/clienttoserver/maps.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hercules/code/clienttoserver') 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 -- cgit v1.2.3-70-g09d2