Browse Source

One more fix for 0.83c build.

Michał W. Urbańczyk 14 years ago
parent
commit
23d0221611
1 changed files with 3 additions and 1 deletions
  1. 3 1
      CCallback.cpp

+ 3 - 1
CCallback.cpp

@@ -1067,7 +1067,9 @@ std::vector<int> CBattleCallback::battleGetDistances(const CStack * stack, THex
 		hex = stack->position;
 
 	std::vector<int> ret;
-	bool ac[BFIELD_SIZE];
+	bool ac[BFIELD_SIZE] = {0};
+	std::set<THex> occupyable;
+	gs->curB->getAccessibilityMap(ac, stack->doubleWide(), stack->attackerOwned, false, occupyable, stack->hasBonusOfType(Bonus::FLYING), stack);
 	THex pr[BFIELD_SIZE];
 	int dist[BFIELD_SIZE];
 	gs->curB->makeBFS(stack->position, ac, pr, dist, stack->doubleWide(), stack->attackerOwned, stack->hasBonusOfType(Bonus::FLYING), false);