don't set bits twice
This commit is contained in:
parent
f04b4a0b42
commit
2b015d49d7
|
@ -41,6 +41,7 @@ House::House(uint32 hId, const std::string &name, const Position &pos)
|
|||
void House::setTile(const TilePtr& tile)
|
||||
{
|
||||
tile->setFlag(TILESTATE_HOUSE);
|
||||
tile->setHouseId(getId());
|
||||
m_tiles.insert(std::make_pair(tile->getPosition(), tile));
|
||||
}
|
||||
|
||||
|
|
|
@ -179,8 +179,8 @@ void Map::loadOtbm(const std::string& fileName)
|
|||
}
|
||||
|
||||
if(const TilePtr& tile = getTile(pos)) {
|
||||
if(house)
|
||||
tile->setHouseId(house->getId());
|
||||
if(tile->hasFlag(TILESTATE_HOUSE))
|
||||
tile->setFlags(tile->getFlags() & ~TILESTATE_HOUSE);
|
||||
tile->setFlags((tileflags_t)flags);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue