1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fixed Duel mode. Integrated some changes from programmingChallenge branch - it's possible to define duel parameters using JSON.

This commit is contained in:
Michał W. Urbańczyk
2012-07-26 00:48:44 +00:00
parent 9327823355
commit 5981ad15d4
5 changed files with 227 additions and 58 deletions

View File

@@ -56,6 +56,8 @@ si8 CBattleInfoCallback::battleCanTeleportTo(const CStack * stack, BattleHex des
std::vector<int> CBattleInfoCallback::battleGetDistances(const CStack * stack, BattleHex hex /*= BattleHex::INVALID*/, BattleHex * predecessors /*= NULL*/)
{
// FIXME - This method is broken, hex argument is not used. However AI depends on that wrong behaviour.
if(!hex.isValid())
hex = stack->position;