浏览代码

VCAI Explore goal: remove useless check

ArseniyShestakov 10 年之前
父节点
当前提交
f490ea1fcd
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      AI/VCAI/Goals.cpp

+ 3 - 6
AI/VCAI/Goals.cpp

@@ -597,12 +597,9 @@ TGoalVec Explore::getAllPossibleSubgoals()
 				case Obj::MONOLITH_TWO_WAY:
 				case Obj::SUBTERRANEAN_GATE:
 					auto tObj = dynamic_cast<const CGTeleport *>(obj);
-					if(tObj)
-					{
-						assert(ai->knownTeleportChannels.find(tObj->channel) != ai->knownTeleportChannels.end());
-						if(TeleportChannel::IMPASSABLE != ai->knownTeleportChannels[tObj->channel]->passability)
-							objs.push_back (obj);
-					}
+					assert(ai->knownTeleportChannels.find(tObj->channel) != ai->knownTeleportChannels.end());
+					if(TeleportChannel::IMPASSABLE != ai->knownTeleportChannels[tObj->channel]->passability)
+						objs.push_back (obj);
 			}
 		}
 		else