Procházet zdrojové kódy

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

Hao Hu před 9 roky
rodič
revize
9ec9cffe9b
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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);
 			}