mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix battle ai trying to act with killed stack
This commit is contained in:
parent
8d3bfbe0bc
commit
5cab8ede90
@ -117,9 +117,9 @@ BattleAction CBattleAI::activeStack( const CStack * stack )
|
|||||||
|
|
||||||
attemptCastingSpell();
|
attemptCastingSpell();
|
||||||
|
|
||||||
if(auto ret = cb->battleIsFinished())
|
if(cb->battleIsFinished() || !stack->alive())
|
||||||
{
|
{
|
||||||
//spellcast may finish battle
|
//spellcast may finish battle or kill active stack
|
||||||
//send special preudo-action
|
//send special preudo-action
|
||||||
BattleAction cancel;
|
BattleAction cancel;
|
||||||
cancel.actionType = EActionType::CANCEL;
|
cancel.actionType = EActionType::CANCEL;
|
||||||
|
Loading…
Reference in New Issue
Block a user