瀏覽代碼

VCAI: explicitly check for teleportation between subterranean gates

ArseniyShestakov 10 年之前
父節點
當前提交
496338813c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AI/VCAI/VCAI.cpp

+ 1 - 1
AI/VCAI/VCAI.cpp

@@ -129,7 +129,7 @@ void VCAI::heroMoved(const TryMoveHero & details)
 		{
 			if(cb->isTeleportChannelBidirectional(t1->channel))
 			{
-				if(o1->ID == Obj::SUBTERRANEAN_GATE)
+				if(o1->ID == Obj::SUBTERRANEAN_GATE && o1->ID == o2->ID) // We need to only add subterranean gates in knownSubterraneanGates. Used for features not yet ported to use teleport channels
 				{
 					knownSubterraneanGates[o1] = o2;
 					knownSubterraneanGates[o2] = o1;