|
|
@@ -18,7 +18,7 @@ namespace PathfinderUtil
|
|
|
using ELayer = EPathfindingLayer;
|
|
|
|
|
|
template<EPathfindingLayer::EEPathfindingLayer layer>
|
|
|
- CGPathNode::EAccessibility evaluateAccessibility(const int3 & pos, const TerrainTile * tinfo, FoW fow, const PlayerColor player, const CGameState * gs)
|
|
|
+ CGPathNode::EAccessibility evaluateAccessibility(const int3 & pos, const TerrainTile & tinfo, FoW fow, const PlayerColor player, const CGameState * gs)
|
|
|
{
|
|
|
if(!(*fow)[pos.z][pos.x][pos.y])
|
|
|
return CGPathNode::BLOCKED;
|
|
|
@@ -27,15 +27,15 @@ namespace PathfinderUtil
|
|
|
{
|
|
|
case ELayer::LAND:
|
|
|
case ELayer::SAIL:
|
|
|
- if(tinfo->visitable)
|
|
|
+ if(tinfo.visitable)
|
|
|
{
|
|
|
- if(tinfo->visitableObjects.front()->ID == Obj::SANCTUARY && tinfo->visitableObjects.back()->ID == Obj::HERO && tinfo->visitableObjects.back()->tempOwner != player) //non-owned hero stands on Sanctuary
|
|
|
+ if(tinfo.visitableObjects.front()->ID == Obj::SANCTUARY && tinfo.visitableObjects.back()->ID == Obj::HERO && tinfo.visitableObjects.back()->tempOwner != player) //non-owned hero stands on Sanctuary
|
|
|
{
|
|
|
return CGPathNode::BLOCKED;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for(const CGObjectInstance * obj : tinfo->visitableObjects)
|
|
|
+ for(const CGObjectInstance * obj : tinfo.visitableObjects)
|
|
|
{
|
|
|
if(obj->blockVisit)
|
|
|
return CGPathNode::BLOCKVIS;
|
|
|
@@ -46,7 +46,7 @@ namespace PathfinderUtil
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else if(tinfo->blocked)
|
|
|
+ else if(tinfo.blocked)
|
|
|
{
|
|
|
return CGPathNode::BLOCKED;
|
|
|
}
|
|
|
@@ -59,13 +59,13 @@ namespace PathfinderUtil
|
|
|
break;
|
|
|
|
|
|
case ELayer::WATER:
|
|
|
- if(tinfo->blocked || tinfo->terType->isLand())
|
|
|
+ if(tinfo.blocked || tinfo.terType->isLand())
|
|
|
return CGPathNode::BLOCKED;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case ELayer::AIR:
|
|
|
- if(tinfo->blocked || tinfo->terType->isLand())
|
|
|
+ if(tinfo.blocked || tinfo.terType->isLand())
|
|
|
return CGPathNode::FLYABLE;
|
|
|
|
|
|
break;
|