1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Converted pathfinder enum's to enum class

This commit is contained in:
Ivan Savenko
2023-06-21 15:38:57 +03:00
parent f78470a301
commit ebc7a82c2e
24 changed files with 162 additions and 161 deletions

View File

@ -1884,11 +1884,11 @@ void CPlayerInterface::doMoveHero(const CGHeroInstance * h, CGPath path)
return cb->getTile(h->convertToVisitablePos(coord))->topVisitableObj(ignoreHero);
};
auto isTeleportAction = [&](CGPathNode::ENodeAction action) -> bool
auto isTeleportAction = [&](EPathNodeAction action) -> bool
{
if (action != CGPathNode::TELEPORT_NORMAL &&
action != CGPathNode::TELEPORT_BLOCKING_VISIT &&
action != CGPathNode::TELEPORT_BATTLE)
if (action != EPathNodeAction::TELEPORT_NORMAL &&
action != EPathNodeAction::TELEPORT_BLOCKING_VISIT &&
action != EPathNodeAction::TELEPORT_BATTLE)
{
return false;
}
@ -1933,7 +1933,7 @@ void CPlayerInterface::doMoveHero(const CGHeroInstance * h, CGPath path)
if (node->layer == EPathfindingLayer::LAND || node->layer == EPathfindingLayer::SAIL)
return true;
if (node->accessible == CGPathNode::ACCESSIBLE)
if (node->accessible == EPathAccessibility::ACCESSIBLE)
return true;
return false;
@ -1959,8 +1959,8 @@ void CPlayerInterface::doMoveHero(const CGHeroInstance * h, CGPath path)
destinationTeleport = destTeleportObj->id;
destinationTeleportPos = nextCoord;
doMovement(h->pos, false);
if (path.nodes[i-1].action == CGPathNode::TELEPORT_BLOCKING_VISIT
|| path.nodes[i-1].action == CGPathNode::TELEPORT_BATTLE)
if (path.nodes[i-1].action == EPathNodeAction::TELEPORT_BLOCKING_VISIT
|| path.nodes[i-1].action == EPathNodeAction::TELEPORT_BATTLE)
{
destinationTeleport = ObjectInstanceID();
destinationTeleportPos = int3(-1);