瀏覽代碼

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;
 		}