diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-24 23:53:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-24 23:53:51 +0300 |
commit | 72168639865fb75a4c216b1058dc8412d4c81277 (patch) | |
tree | 876e745fe1b5924073faedd53d28a68a83e4593a /src/map.cpp | |
parent | f9feb8f1fd4e2dc56218aba40ef94962fa866f84 (diff) | |
download | plus-72168639865fb75a4c216b1058dc8412d4c81277.tar.gz plus-72168639865fb75a4c216b1058dc8412d4c81277.tar.bz2 plus-72168639865fb75a4c216b1058dc8412d4c81277.tar.xz plus-72168639865fb75a4c216b1058dc8412d4c81277.zip |
Add autodetection walkable tiles in maps without client data.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp index 0530b2702..f252308b6 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -151,7 +151,8 @@ Map::Map(int width, int height, int tileWidth, int tileHeight): mDrawScrollX(-1), mDrawScrollY(-1), mRedrawMap(true), - mBeingOpacity(false) + mBeingOpacity(false), + mCustom(false) { const int size = mWidth * mHeight; for (int i = 0; i < NB_BLOCKTYPES; i++) @@ -659,6 +660,11 @@ bool Map::getWalk(int x, int y, unsigned char walkmask) const return !(mMetaTiles[x + y * mWidth].blockmask & walkmask); } +void Map::setWalk(int x, int y, bool walkable) +{ + blockTile(x, y, Map::BLOCKTYPE_GROUNDTOP); +} + bool Map::occupied(int x, int y) const { const ActorSprites &actors = actorSpriteManager->getAll(); |