소스 검색

Bug fix for berserk: fixed the issue that the berserk affected stack
won't attack the nearest live stack.

Hao Hu 9 년 전
부모
커밋
9ec9cffe9b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/CBattleCallback.cpp

+ 1 - 1
lib/CBattleCallback.cpp

@@ -1366,7 +1366,7 @@ std::pair<const CStack *, BattleHex> CBattleInfoCallback::getNearestStack(const
 		for(BattleHex hex : avHexes)
 			if(CStack::isMeleeAttackPossible(closest, st, hex))
 			{
-				DistStack hlp = {reachability.distances[st->position], hex, st};
+				DistStack hlp = {reachability.distances[hex], hex, st};
 				stackPairs.push_back(hlp);
 			}