mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix crash on attempt to compute movement range for siege tower
This commit is contained in:
		| @@ -742,7 +742,7 @@ DamageEstimation CBattleInfoCallback::battleEstimateDamage(const battle::Unit * | ||||
| { | ||||
| 	RETURN_IF_NOT_BATTLE({}); | ||||
| 	auto reachability = battleGetDistances(attacker, attacker->getPosition()); | ||||
| 	int getMovementRange = reachability[attackerPosition]; | ||||
| 	int getMovementRange = attackerPosition.isValid() ? reachability[attackerPosition] : 0; | ||||
| 	return battleEstimateDamage(attacker, defender, getMovementRange, retaliationDmg); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user