소스 검색

Move foreign hero fix

Fixed an issue that caused the AI to try and move heroes of other players.
Xilmi 1 년 전
부모
커밋
f0802c0b3c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;
 		}