1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-13 23:57:41 +02:00

* INFINITE_DIST is now enum, it should cause least trouble that way. Uh, it's so hard to fight magic values these days.

* Fixed crashes in battles after loading game
* Fixed crash in battle AI, when stack is blocked and stands next to an enemy
* Fixes problem when server's moveStack is called with dest==position
* Above should cover #1053.
This commit is contained in:
Michał W. Urbańczyk
2012-08-26 19:13:57 +00:00
parent d5f29d134f
commit 7c09f73402
5 changed files with 51 additions and 42 deletions

View File

@@ -1086,7 +1086,7 @@ ReachabilityInfo CBattleInfoCallback::makeBFS(const AccessibilityInfo &accessibi
ret.params = params;
ret.predecessors.fill(BattleHex::INVALID);
ret.distances.fill(static_cast<int>(ReachabilityInfo::INFINITE_DIST));
ret.distances.fill(ReachabilityInfo::INFINITE_DIST);
const std::set<BattleHex> quicksands = getStoppers(params.perspective);
//const bool twoHexCreature = params.doubleWide;