浏览代码

* dead stacks won't be displayed in battle queue
* fixed bug with pathfinder

mateuszb 17 年之前
父节点
当前提交
8c937d92ad
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 1
      CBattleInterface.cpp
  2. 1 0
      CGameState.cpp

+ 2 - 1
CBattleInterface.cpp

@@ -387,7 +387,8 @@ void CBattleInterface::show(SDL_Surface * to)
 		std::vector<CStack> stacksSorted;
 		for(int v=0; v<stacks.size(); ++v)
 		{
-			stacksSorted.push_back(stacks[v]);
+			if(stacks[v].alive()) //we don't want dead stacks to be there
+				stacksSorted.push_back(stacks[v]);
 		}
 		std::stable_sort(stacksSorted.begin(), stacksSorted.end(), cmpst2);
 		int startFrom = -1;

+ 1 - 0
CGameState.cpp

@@ -43,6 +43,7 @@ CGObjectInstance * createObject(int id, int subid, int3 pos, int owner)
 			nobj->defInfo->id = 34;
 			nobj->defInfo->subid = subid;
 			nobj->defInfo->printPriority = 0;
+			nobj->defInfo->visitDir = 0xff;
 			nobj->type = VLC->heroh->heroes[subid];
 			for(int i=0;i<6;i++)
 			{