diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-06 22:57:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 22:57:15 +0300 |
commit | 389bc38eaf1de20545159dd25d697c614c671b14 (patch) | |
tree | 4ffd80671f905a3c7f5e96ee4b3f9ae0df50ee62 /hercules | |
parent | 365dc28a519483da17d494e18c0aaf6259df41b8 (diff) | |
download | tools-389bc38eaf1de20545159dd25d697c614c671b14.tar.gz tools-389bc38eaf1de20545159dd25d697c614c671b14.tar.bz2 tools-389bc38eaf1de20545159dd25d697c614c671b14.tar.xz tools-389bc38eaf1de20545159dd25d697c614c671b14.zip |
hercules: fix different collision types, for now use only 0 and 1.
Diffstat (limited to 'hercules')
-rwxr-xr-x | hercules/maptool.py | 17 |
1 files changed, 16 insertions, 1 deletions
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) |