mapio: make sure we read the house tile flag

This commit is contained in:
Ahmed Samy 2013-10-12 11:38:30 +02:00
parent f47ea05abc
commit 63ce68b449
2 changed files with 3 additions and 1 deletions

View File

@ -137,6 +137,8 @@ void Map::loadOtbm(const std::string& fileName)
if((_flags & TILESTATE_REFRESH) == TILESTATE_REFRESH) if((_flags & TILESTATE_REFRESH) == TILESTATE_REFRESH)
flags |= TILESTATE_REFRESH; flags |= TILESTATE_REFRESH;
if((_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE)
flags |= TILESTATE_HOUSE;
break; break;
} }
case OTBM_ATTR_ITEM: { case OTBM_ATTR_ITEM: {

View File

@ -119,7 +119,7 @@ public:
void setHouseId(uint32 hid) { m_houseId = hid; } void setHouseId(uint32 hid) { m_houseId = hid; }
uint32 getHouseId() { return m_houseId; } uint32 getHouseId() { return m_houseId; }
bool isHouseTile() const { return (m_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE; } bool isHouseTile() const { return m_houseId != 0 && (m_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE; }
TilePtr asTile() { return static_self_cast<Tile>(); } TilePtr asTile() { return static_self_cast<Tile>(); }