Improve autowalk

This commit is contained in:
Eduardo Bart
2013-01-22 16:04:36 -02:00
parent 01e48fbcc8
commit e900a7679a
6 changed files with 55 additions and 22 deletions

View File

@@ -611,8 +611,8 @@ std::tuple<std::vector<Otc::Direction>, Otc::PathFindResult> Map::findPath(const
tiles, need to rework this for "fly servers" and blank map click,
but it is breaking normal path finding.
*/
if(!(flags & Otc::PathFindAllowNullTiles) && !tile)
walkFactor = 3.0f;
if(!(flags & Otc::PathFindAllowNullTiles) && (!tile || tile->isEmpty()))
continue;
if(tile) {
if(!(flags & Otc::PathFindAllowCreatures) && tile->hasCreature())
continue;