mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-29 00:41:38 +02:00
Implemented flagged garrisons passableness ( #150 ). Full support for BorderGates.
This commit is contained in:
@ -2068,7 +2068,11 @@ void CGameState::calculatePaths(const CGHeroInstance *hero, CPathsInfo &out, int
|
||||
for(size_t ii = 0; ii < tinfo->visitableObjects.size(); ii++)
|
||||
{
|
||||
const CGObjectInstance * const obj = tinfo->visitableObjects[ii];
|
||||
if(obj->blockVisit)
|
||||
if(obj->getPassableness() & 1<<hero->tempOwner) //special object instance specific passableness flag - overwrites other accessibility flags
|
||||
{
|
||||
node.accessible = CGPathNode::ACCESSIBLE;
|
||||
}
|
||||
else if(obj->blockVisit)
|
||||
{
|
||||
node.accessible = CGPathNode::BLOCKVIS;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user