Explorar o código

Move foreign hero fix

Fixed an issue that caused the AI to try and move heroes of other players.
Xilmi hai 1 ano
pai
achega
f0802c0b3c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      AI/Nullkiller/Pathfinding/AINodeStorage.cpp

+ 2 - 1
AI/Nullkiller/Pathfinding/AINodeStorage.cpp

@@ -1413,7 +1413,8 @@ void AINodeStorage::calculateChainInfo(std::vector<AIPath> & paths, const int3 &
 			|| node.layer != layer
 			|| node.action == EPathNodeAction::UNKNOWN
 			|| !node.actor
-			|| !node.actor->hero)
+			|| !node.actor->hero
+			|| node.actor->hero->getOwner() != ai->playerID)
 		{
 			continue;
 		}