From 389bc38eaf1de20545159dd25d697c614c671b14 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Sep 2014 22:57:15 +0300 Subject: hercules: fix different collision types, for now use only 0 and 1. --- hercules/maptool.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'hercules/maptool.py') diff --git a/hercules/maptool.py b/hercules/maptool.py index f82787f..2ee5b99 100755 --- a/hercules/maptool.py +++ b/hercules/maptool.py @@ -69,7 +69,22 @@ def getTile(mapData, x, y, sx): data = mapData[y * sx + x] arr = array.array("B") arr.fromstring(data) - return arr[0] + data = arr[0] + if data == 0: # 000 normal walkable + data = 0 + elif data == 1: # 001 non walkable + data = 1 + elif data == 2: # 010 same with 0 + data = 0 + elif data == 3: # 011 same with 0, but water + data = 0 + elif data == 4: # 100 same with 0 + data = 0 + elif data == 5: # 101 same with 1, but shootable (for now not supported!!!) + data = 1 + elif data == 6: # 110 same with 0 + data = 0 + return data def getGroundTile(flag): return str(flag + 1) -- cgit v1.2.3-60-g2f50