mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Fixed crash when unit dies by entering obstacle (eg. moat) on the way to perform attack.
This commit is contained in:
@ -3404,6 +3404,7 @@ bool CGameHandler::makeBattleAction( BattleAction &ba )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//attack
|
//attack
|
||||||
|
if(stack->alive()) //move can cause death, eg. by walking into the moat
|
||||||
{
|
{
|
||||||
BattleAttack bat;
|
BattleAttack bat;
|
||||||
prepareAttack(bat, stack, stackAtEnd, distance, ba.additionalInfo);
|
prepareAttack(bat, stack, stackAtEnd, distance, ba.additionalInfo);
|
||||||
|
Reference in New Issue
Block a user