From 72168639865fb75a4c216b1058dc8412d4c81277 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 Jun 2012 23:53:51 +0300 Subject: Add autodetection walkable tiles in maps without client data. --- src/map.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map.cpp') 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(); -- cgit v1.2.3-60-g2f50