1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Remove pointer to boat from CGHeroInstance

This commit is contained in:
Ivan Savenko
2025-03-26 15:37:26 +00:00
parent 331debaa3f
commit 9e6397d1f9
24 changed files with 89 additions and 73 deletions

View File

@@ -111,7 +111,7 @@ std::optional<AIPathNode *> AINodeStorage::getOrCreateNode(const int3 & pos, con
std::vector<CGPathNode *> AINodeStorage::getInitialNodes()
{
auto hpos = hero->visitablePos();
auto initialNode = getOrCreateNode(hpos, hero->boat ? EPathfindingLayer::SAIL : EPathfindingLayer::LAND, NORMAL_CHAIN).value();
auto initialNode = getOrCreateNode(hpos, hero->inBoat() ? EPathfindingLayer::SAIL : EPathfindingLayer::LAND, NORMAL_CHAIN).value();
initialNode->turns = 0;
initialNode->moveRemains = hero->movementPointsRemaining();