mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Tweaks
This commit is contained in:
@@ -23,11 +23,11 @@ private:
|
|||||||
CPlayerSpecificInfoCallback * cb;
|
CPlayerSpecificInfoCallback * cb;
|
||||||
VCAI * ai;
|
VCAI * ai;
|
||||||
|
|
||||||
|
std::shared_ptr<AINodeStorage> getOrCreateStorage(HeroPtr hero);
|
||||||
public:
|
public:
|
||||||
AIPathfinder(CPlayerSpecificInfoCallback * cb, VCAI * ai);
|
AIPathfinder(CPlayerSpecificInfoCallback * cb, VCAI * ai);
|
||||||
std::vector<AIPath> getPathInfo(HeroPtr hero, int3 tile);
|
std::vector<AIPath> getPathInfo(HeroPtr hero, int3 tile);
|
||||||
bool isTileAccessible(HeroPtr hero, int3 tile);
|
bool isTileAccessible(HeroPtr hero, int3 tile);
|
||||||
std::shared_ptr<AINodeStorage> getOrCreateStorage(HeroPtr hero);
|
|
||||||
void clear();
|
void clear();
|
||||||
void init();
|
void init();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ Goals::TGoalVec PathfindingManager::howToVisitTile(int3 tile)
|
|||||||
Goals::TGoalVec result;
|
Goals::TGoalVec result;
|
||||||
|
|
||||||
auto heroes = cb->getHeroesInfo();
|
auto heroes = cb->getHeroesInfo();
|
||||||
|
result.reserve(heroes.size());
|
||||||
|
|
||||||
for(auto hero : heroes)
|
for(auto hero : heroes)
|
||||||
{
|
{
|
||||||
@@ -51,6 +52,7 @@ Goals::TGoalVec PathfindingManager::howToVisitObj(ObjectIdRef obj)
|
|||||||
Goals::TGoalVec result;
|
Goals::TGoalVec result;
|
||||||
|
|
||||||
auto heroes = cb->getHeroesInfo();
|
auto heroes = cb->getHeroesInfo();
|
||||||
|
result.reserve(heroes.size());
|
||||||
|
|
||||||
for(auto hero : heroes)
|
for(auto hero : heroes)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user