Browse Source

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

Hao Hu 9 years ago
parent
commit
9ec9cffe9b
1 changed files with 1 additions and 1 deletions
  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);
 			}