瀏覽代碼

Missed the file.

Michał W. Urbańczyk 13 年之前
父節點
當前提交
2ad89a29c4
共有 1 個文件被更改,包括 22 次插入0 次删除
  1. 22 0
      lib/CObstacleInstance.cpp

+ 22 - 0
lib/CObstacleInstance.cpp

@@ -0,0 +1,22 @@
+#include "StdInc.h"
+#include "CObstacleInstance.h"
+#include "CHeroHandler.h"
+#include "VCMI_Lib.h"
+
+CObstacleInstance::CObstacleInstance()
+{
+	isAbsoluteObstacle = false;
+}
+
+const CObstacleInfo & CObstacleInstance::getInfo() const
+{
+	if(isAbsoluteObstacle)
+		return VLC->heroh->absoluteObstacles[ID];
+
+	return VLC->heroh->obstacles[ID];
+}
+
+std::vector<BattleHex> CObstacleInstance::getBlocked() const
+{
+	return getInfo().getBlocked(pos);
+}