瀏覽代碼

Proper fix for http://bugs.vcmi.eu/view.php?id=2422

AlexVinS 9 年之前
父節點
當前提交
0d5eaa1183
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/spells/BattleSpellMechanics.cpp

+ 1 - 1
lib/spells/BattleSpellMechanics.cpp

@@ -430,7 +430,7 @@ void ObstacleMechanics::applyBattleEffects(const SpellCastEnvironment * env, con
 			for(int i = 0; i < GameConstants::BFIELD_SIZE; i += 1)
 			for(int i = 0; i < GameConstants::BFIELD_SIZE; i += 1)
 			{
 			{
 				BattleHex hex = i;
 				BattleHex hex = i;
-				if(!(parameters.cb->battleGetStackByPos(hex, false)) && !(parameters.cb->battleGetObstacleOnPos(hex, false)))
+				if(hex.getX() > 0 && hex.getX() < 16 && !(parameters.cb->battleGetStackByPos(hex, false)) && !(parameters.cb->battleGetObstacleOnPos(hex, false)))
 					availableTiles.push_back(hex);
 					availableTiles.push_back(hex);
 			}
 			}
 			boost::range::random_shuffle(availableTiles);
 			boost::range::random_shuffle(availableTiles);