1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Ambient sounds: implement chebyshev distance for getTilesInRange

This commit is contained in:
Arseniy Shestakov
2016-02-10 18:36:56 +03:00
committed by DJWarmonger
parent e7fa9f8cd6
commit e9bfbb70c1
4 changed files with 34 additions and 8 deletions

View File

@@ -662,7 +662,7 @@ void CPathfinder::initializePatrol()
if(hero->patrol.patrolRadius)
{
state = PATROL_RADIUS;
gs->getTilesInRange(patrolTiles, hero->patrol.initialPos, hero->patrol.patrolRadius, boost::optional<PlayerColor>(), 0, true);
gs->getTilesInRange(patrolTiles, hero->patrol.initialPos, hero->patrol.patrolRadius, boost::optional<PlayerColor>(), 0, int3::DIST_MANHATTAN);
}
else
state = PATROL_LOCKED;