mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
New lightweight minimap format, finish #15
This commit is contained in:
@@ -476,7 +476,7 @@ ThingPtr Tile::getTopMultiUseThing()
|
||||
return m_things[0];
|
||||
}
|
||||
|
||||
bool Tile::isWalkable()
|
||||
bool Tile::isWalkable(bool ignoreCreatures)
|
||||
{
|
||||
if(!getGround())
|
||||
return false;
|
||||
@@ -485,24 +485,17 @@ bool Tile::isWalkable()
|
||||
if(thing->isNotWalkable())
|
||||
return false;
|
||||
|
||||
if(thing->isCreature()) {
|
||||
CreaturePtr creature = thing->static_self_cast<Creature>();
|
||||
if(!creature->isPassable() && creature->canBeSeen())
|
||||
return false;
|
||||
if(!ignoreCreatures) {
|
||||
if(thing->isCreature()) {
|
||||
CreaturePtr creature = thing->static_self_cast<Creature>();
|
||||
if(!creature->isPassable() && creature->canBeSeen())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Tile::changesFloor()
|
||||
{
|
||||
for(const ThingPtr& thing : m_things) {
|
||||
if(thing->isTranslucent() || (thing->isOnBottom() && thing->hasElevation()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Tile::isPathable()
|
||||
{
|
||||
for(const ThingPtr& thing : m_things) {
|
||||
|
Reference in New Issue
Block a user