Преглед изворни кода

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